Open sandboxFocusImprove this doc

PS0233: Input Assembly Does Not Exist

Severity Error
Reported by PostSharp
Message Input file "<InputFile>" does not exist.

Cause

The PostSharp compiler processes one assembly, which the Input property of the PostSharp project names. In a normal build, the MSBuild targets of PostSharp move the assembly that the C# compiler has just produced to the BeforePostSharp folder under the intermediate output directory (obj) of the project, and set Input to this file.

PostSharp reports PS0233 when the file <InputFile> does not exist while PostSharp loads the project. It is a fatal error: PostSharp stops at once. Common causes are:

  • Another process deleted or quarantined the file between the C# compiler and PostSharp, for example an antivirus, or another build of the same project that cleaned its obj folder at the same time.
  • PostSharp is invoked directly, from the command line or from a custom build script, with a wrong path.
  • A customization of the build sets the Input property to another file.

This message depends on the file system and on the build process, so no example can show it.

Resolution

  • Rebuild the project. When the message does not come back, the file was removed by another process: check that two builds of the same project do not run at the same time, for example from the IDE and from the command line, and exclude the obj folders of your projects from the scans of your antivirus.
  • When you invoke the PostSharp compiler directly, check the path that you pass in the command line or in the Input property.
  • When you customized the MSBuild targets of PostSharp, check that they do not set Input, and do not move or delete the files of the BeforePostSharp folder.

See Also

Other Resources

Well-Known MSBuild Properties