Overview

System Properties

The following properties are defined by PostSharp:

NameDescription
PostSharpDirectoryFull path of the directory containing the PostSharp.Core.dll library. If this library is located in the Global Assembly Cache (GAC), this property is read from registry.
PlugInDirectoryFull path of the system-level plug-in directory
ApplicationDataDirectoryFull path of the user-level application data directory. Typically C:\Documents and Settings\userName\Application Data.
UserPlugInDirectoryFull path of the user-level plug-in directory.
TargetPlatformWhen defined, name of the target platform (used to compile the transformed assembly). Refers to a Platform element of the application or plug-in configuration files. When not defined, the default platform is used.
ProjectDirectoryFull path of the directory that contains the current project file (.psproj).
WorkingDirectoryWorking directory of the build process (as in Environment.CurrentDirectory).

Common Properties

The following properties are used by the default project (Default.psproj) and are set by the MSBuild task. You need to specify these properties if you invoke PostSharp with the default project using the command line.

NameDescription
Output (required)Full path of the output assembly.
ReferenceDirectoryDirectory by reference to which relative paths in the psproj will be resolved. We pass the root directory of the project (i.e. the directory containing your csprojfile).
ConfigurationDebug or Release, typically. It is not used by Default.psproj.
PlatformAny, typically. It is not used by Default.psproj.
SearchPathComma-separated list of directories that have to be added to the search path while looking for plug-ins or referenced assemblies. We pass the output directory (i.e. bin\debug) as well as all reference paths defined in user-level project properties.
IntermediateDirectoryTells PostSharp where to put its own intermediate stuff. We pass typically obj\debug\PostSharp.
CleanIntermediateWhether PostSharp should clean its intermediate files after execution. We pass false.
MSBuildFullProjectPathFull path of the MSBuild project file (the csproj or vbproj). This is to solve relative paths that users could pass in custom attributes.
SignAssemblyDetermines whether the assembly should be signed. We take this value from MSBuild.
PrivateKeyLocationLocation of the private key. We take this value from MSBuild.