PostSharp has well documented different methods of installation. I’ve chosen installing NuGet packages, because according to
NuGet is the easiest way to add PostSharp to a project without installing the product on every machine.
However it didn’t work well for me. I’ve added PostSharp NuGet package to one project in the solution.
When I wanted to use PostSharp in other project, Visual Studio tab showed that PostSharp is not enabled for this project
I’ve added the NuGet package to the new project, which installed a new version of the package in the new Packages subfolder.
When I wanted to refer PostSharp from the third project, I’ve ended up with another version of PostSharp installed.
Additionally multiple versions of Diagnostics were created. It definitely causes confusion and errors.
More problems we experienced on build server. According to Using PostSharp on a Build Server
“If you chose to deploy PostSharp in the source repository, it does not need to be installed specifically on the build server. “
It didn’t work on our build server.
I kept getting errors “The “AddIns” parameter is not supported by the “PostSharp21″ task.” and “The “DisableSystemBindingPolicies” parameter is not supported by the “PostSharp21″ task.”
From my experience the only way to have the latest version of PostSharp working on the build server is to install it using Setup as described in Deploying PostSharp with the Setup Program
Gael acknowledged the issues with possible version conflicts. see http://support.sharpcrafters.com/discussions/problems/388-the-postsharp21-task-failed-unexpectedly