This is the online documentation for PostSharp 5.0.
Download PDF or CHM. Go to v4.3 or v5.0

Using PostSharp on a Build Server

PostSharp has been designed for frictionless use on build servers. PostSharp build-time components are deployed as NuGet packages, and are integrated with MSBuild. No component needs to be installed or configured on the build server, and no extra build step is necessary. If you choose not to check in NuGet packages in your source control, read Restoring Packages at Build Time.

Installing a License on the Build Server

The License Agreement specifies that build servers don’t need their own license. PostSharp will not attempt to enforce licensing if it detects that it runs in unattended mode. PostSharp uses several heuristics to detect whether it is running unattended. These heuristics include the use of Environment.UserInteractive, checking Process.SessionId (from Windows Vista, all processes running in session 0 are unattended), or checking the parent process.

If this check does not work for any reason, you may use the license key of any licensed user for the build server. This will not be considered a license infringement. However, it is better to report the issue to our technical support so that we can fix the detection algorithms.

It is recommended to include the license key in the source control. See Deploying License Keys for details.

Caution note Caution

When building assemblies which use PostSharp Diagnostics, you need add your license key to postsharp.config, otherwise the build server will fall back to PostSharp Diagnostics Developer Edition. See Licensing of PostSharp Diagnostics for details.

See Also