PostSharp6.0/Deployment and Configuration/Configuration/Working with Post­Sharp Configuration Files/Well-Known Post­Sharp Properties

Well-Known PostSharp Properties

The following table lists the PostSharp properties that may be set from the MSBuild project. The second column specifies the name of the MSBuild property that influences the value of the PostSharp property, if any.

Property Name

MSBuild Property Name

Description

Configuration

Configuration

Build configuration (typically Debug or Release).

Platform

Platform

Target processor architecture (typically AnyCPU, x86 or x64).

MSBuildProjectFullPath

MSBuildProjectFullPath

Full path of the C# or VB project being built.

IgnoredAssemblies

Comma-separated list of assembly short names (without extension) that should be ignored by the dependency scanning algorithm. Add an assembly to this list if it is obfuscated, or contains native code, and causes PostSharp to fail.

ReferenceDirectory

MSBuildProjectDirectory

Directory with respect to which relative paths are resolved.

SearchPath

PostSharpSearchPath

Comma-separated list of directories containing reference assemblies and plug-ins.

TargetFrameworkIdentifier

TargetFrameworkIdentifier

Identifier of the target framework of the current project (i.e. the framework on which the application will run). For instance .NETFramework or Silverlight.

TargetFrameworkVersion

TargetFrameworkVersion

Version of the target framework of the current project (i.e. the framework on which the application will run). For instance v4.0.

TargetFrameworkProfile

TargetFrameworkProfile

Profile of the target framework of the current project (i.e. the framework on which the application will run). For instance WindowsPhone.

Other properties are recognized but are of little interest for end-users. For a complete list of properties, see PostSharp.targets.

Using custom properties

By defining your own PostSharp properties, you can pass information from the build environment to aspects, or to any code running in PostSharp. Custom PostSharp properties behave exactly as other PostSharp properties, so they can be defined and read using the same procedures.