| Severity | Error |
| Reported by | PostSharp |
| Message | The plug-in "<PlugIn>" was found only at "<Path>", which is its build for <OtherRuntime>. The compiler runs on <Runtime> and loads plug-ins from a subdirectory named "<Runtime>". The package that contains the plug-in does not provide a build for <Runtime>. |
Cause
The PostSharp compiler runs on .NET Framework (net472) or on .NET (net10.0). A package that contains a plug-in of PostSharp can provide one build of the plug-in for each runtime, in subdirectories named after them, such as tools/net472 and tools/net10.0. In each directory of its search path, PostSharp looks for the plug-in first in the subdirectory named after its own runtime, then in the directory itself.
PostSharp reports PS0283 when it does not find the plug-in this way, but finds a file of the plug-in in the subdirectory of the other runtime. <PlugIn> is the name of the plug-in, <Path> is the full path of the file that PostSharp found, <OtherRuntime> is the name of the subdirectory where it found it, and <Runtime> is the runtime of the compiler. PostSharp does not load a build of a plug-in for another runtime, so an error about the missing plug-in, such as PS0052, usually follows.
This happens when a package provides its plug-in for only one runtime, for example only in tools/net472, and the project is processed by the compiler of the other runtime.
This message depends on the content of a package and on the runtime of the PostSharp compiler, so no example can show it.
Resolution
- Use a version of the package that provides a build of the plug-in for
<Runtime>, or ask its vendor for one. A plug-in built for .NET Standard 2.0 and placed directly in thetoolsdirectory works with both runtimes. - When you develop the plug-in, add a build for
<Runtime>to the package, in the subdirectory that the message names.
To follow how PostSharp looks for the plug-in, enable the ProjectLoader trace category with the PostSharpTrace MSBuild property (see Well-Known MSBuild Properties).
See Also
Other Resources
Well-Known MSBuild Properties
Configuration File Schema Reference