Open sandboxFocusImprove this doc

PS0141: Project Provider of a Plug-In Does Not Implement IProjectConfigurationProvider

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 remove ExportProjectAttribute from the types that are not project providers. Replace the obsolete AssemblyProjectProviderAttribute with ExportProjectAttribute.
  • 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 Using element that imports it from the postsharp.config file. See Configuration File Schema Reference.

See Also

Other Resources

Configuration File Schema Reference
Configuring Projects Using postsharp.config