Configuring Projects in Visual Studio
PostSharp accepts several configuration settings such as the version and processor architecture of the CLR that is used at build time, the search path of dependencies, and whether some features are enabled.
Although the default configuration is appropriate for most situations, you may have to fine-tune some of them to cope with particular cases.
This article describes how to configure the settings in Visual Studio. You can also edit the MSBuild properties directly in a text editor. For details, see Configuring Projects Using MSBuild.
Starting from Visual Studio 2022, the project properties tab is no longer available for SDK-style projects. Instead, you should edit the MSBuild properties using the text editor.
Editing properties in Visual Studio
To open the PostSharp project property page in Visual Studio
Open the Solution Explorer.
Right-click on the project then select Properties at the bottom of the menu.
Select the PostSharp tab.
Explanation of configuration settings
Note that all settings are dependent on the selected project configuration (for instance
Debug) and platform (for instance
|Setting||MSBuild property name||Description|
|Additional search path||
||A semicolon-separated list of directories where plug-ins and libraries have to be searched for. This property can reference other MSBuild properties, for instance:
||A semicolon-separated list of property definition, for instance:
||A semicolon-separated list of warning identifiers that must be ignored, or
|Treat warnings as errors||
||A semicolon-separated list of warning identifiers that must be escalated into errors, or
||The version of the CLR that hosts PostSharp. PostSharp currently only supports the CLR 4.0 so this setting is disabled.|
||The processor architecture (
||The kind of process hosting PostSharp, which influences the assembly loading mechanism, compatibility and performance features. See hosting-properties.|
||When set to