| Severity | Error |
| Reported by | PostSharp |
| Message | The type that the custom attribute ExportProjectAttribute or AssemblyProjectProviderAttribute designates in assembly "<Assembly>" does not implement IProjectConfigurationProvider. |
Cause
A plug-in of PostSharp is an assembly that extends the PostSharp compiler, written with the PostSharp SDK. PostSharp loads it when a Using element of a configuration file names it, or when the build passes it as an add-in. To read the configuration of the plug-in, PostSharp looks in the assembly for a project provider: the type designated by the assembly-level AssemblyProjectProviderAttribute, which is obsolete, or else a public type that carries ExportProjectAttribute. PostSharp creates an instance of this type and asks it for the configuration through the IProjectConfigurationProvider interface.
PostSharp reports PS0141 when the project provider does not implement IProjectConfigurationProvider. <Assembly> is the full path of the plug-in assembly. The message is fatal: the build stops.
This message concerns the development of a plug-in with the PostSharp SDK, and its text contains the path of a file of the build, so no example can show it.
Resolution
- If you develop the plug-in, make the project provider type implement
IProjectConfigurationProvider, or removeExportProjectAttributefrom the types that are not project providers. Replace the obsoleteAssemblyProjectProviderAttributewithExportProjectAttribute. - If the plug-in comes from a third party, make sure that the plug-in was built for this version of PostSharp, and ask its vendor for an update.
- If you do not need the plug-in, remove the
Usingelement that imports it from thepostsharp.configfile. See Configuration File Schema Reference.
See Also
Other Resources
Configuration File Schema Reference
Configuring Projects Using postsharp.config