Open sandboxFocusImprove this doc

PS0143: Plug-In Assembly Defines Several Projects

Severity Error
Reported by PostSharp
Message The assembly "<Assembly>" defines several projects with the custom attribute AssemblyProjectProviderAttribute; append a semicolon and the name of the project to the file name of the assembly.

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. With the obsolete assembly-level AssemblyProjectProviderAttribute, a plug-in assembly can define several projects, each with a name and a project provider.

PostSharp reports PS0143 when the assembly has more than one AssemblyProjectProviderAttribute and the file name that refers to the assembly does not end with a semicolon and the name of a project, as in MyPlugIn.dll;Logging. <Assembly> is the full path of the plug-in assembly. The message is fatal: the build stops.

The ProjectName attribute of the Using element does not select the project in this version of PostSharp: only the name after the semicolon does.

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

  • Name the project after a semicolon in the File attribute of the Using element, for example <Using File="MyPlugIn.dll;Logging" />.
  • If you develop the plug-in, replace the AssemblyProjectProviderAttribute attributes with one type that carries ExportProjectAttribute, or with ExportTaskAttribute and ExportServiceAttribute on the tasks and services, so that the assembly defines a single project.
  • If you do not need the plug-in, remove the Using element that imports it. See Configuration File Schema Reference.

See Also

Other Resources

Configuration File Schema Reference
Configuring Projects Using postsharp.config