Rob Bird
Rob Bird

Reputation: 3824

Disable Postsharp in debug builds for entire solution

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.

Upvotes: 5

Views: 6218

Answers (2)

hdoghmen
hdoghmen

Reputation: 3422

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

Upvotes: 3

Gael Fraiteur
Gael Fraiteur

Reputation: 6857

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

Upvotes: 7

Related Questions