Open sandboxFocusImprove this doc

PS0142: Project Provider of a Plug-In Returned No Configuration

Severity Error
Reported by PostSharp
Message The project configuration provider that the custom attribute ExportProjectAttribute or AssemblyProjectProviderAttribute designates in assembly "<Assembly>" returned a null project configuration.

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 creates an instance of its project provider, the type designated by the obsolete assembly-level AssemblyProjectProviderAttribute or by ExportProjectAttribute, and calls the GetProjectConfiguration method of its IProjectConfigurationProvider interface.

PostSharp reports PS0142 when this method returns null. <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 GetProjectConfiguration return a project configuration in every case. When the plug-in defines its tasks with ExportTaskAttribute and its services with ExportServiceAttribute, it does not need a project provider: remove it.
  • 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