Open sandboxFocusImprove this doc

PS0228: File of the Installed Frameworks Is Missing

Severity Error
Reported by PostSharp
Message The file "<Path>" that the PostSharp property "<Property>" points to does not exist.

Cause

Before it starts the PostSharp compiler, the build lists the .NET frameworks whose reference assemblies are installed on the machine, and writes this list to an XML file of the FrameworkInfo subdirectory of the cache directory, which the PostSharpCacheDirectory MSBuild property sets. It passes the path of this file to the compiler in the InstalledFrameworksFilePath property. The build always sets this property itself, replacing any value that the project gives.

PostSharp reports PS0228, a fatal error, when the compiler starts and the file does not exist. <Property> is InstalledFrameworksFilePath, and <Path> is the path of the file. Since the build has just created the file, this means that another process deleted it in the meantime, for example a tool that cleans the cache directory or the temporary files, or an antivirus that quarantined it.

This message depends on the file system and on the other processes of the machine, so no example can show it.

Resolution

  • Build the project again. The build creates the file again when it is missing.
  • When the message comes back, look for the process that deletes files from the cache directory of PostSharp: a cleanup script of the build agent, a scheduled task, or an antivirus. Exclude the cache directory from it.
  • When the cache directory is on a network drive or a volume that is cleaned between the steps of a build, set the PostSharpCacheDirectory MSBuild property or environment variable to a local directory that the build keeps. See Well-Known MSBuild Properties.

See Also

Other Resources

Well-Known MSBuild Properties