Search code examples
c#unit-testingnunitaoppostsharp

How do you disable PostSharp when running unit tests?


I want my nunit tests not to apply any of my PostSharp aspects so I can test my methods in isolation. Can this be done somehow in the Test Fixture Setup, or can it only be done on a per project level?


Solution

  • You could set the 'SkipPostSharp' flag on the test build, so that it is not compiled into your binaries in the first place.