Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Postsharp in debug builds for entire solution

Tags:

postsharp

I have a solution with many projects and I would like to disable Postsharp for debug builds to reduce local developer build times. Is there any way to do this without editing each project file?

I know this may sound like a bad idea, but we are only using Postsharp for exception logging and our builds go through several environments for automated/manual testing (which would use a release build), so we would pick up on any potential issues at this point.

If it helps, Postsharp was added to the projects via nuget.

like image 604
Rob Bird Avatar asked Apr 03 '12 09:04

Rob Bird


2 Answers

You can define the compilation symbol (constant) "SkipPostSharp" for Debug mode only.

like image 87
Gael Fraiteur Avatar answered Oct 13 '22 22:10

Gael Fraiteur


I don't know how to do it for the entire solution, but it can be done easily per project.

  1. Project > Setting > PostSharp

  2. Choose Yes for Disable PostSharp for this configuration

Disable PostSharp

like image 38
hdoghmen Avatar answered Oct 13 '22 22:10

hdoghmen