We have a solution with 15 projects, which all has code analysis enabled.
The solution easily takes 60+ seconds to build, which is a very long time when sitting waiting.
If I disable code analysis it builds in 10 sesonds.
I would love to be able to disable code analysis on an ad-hoc basis. But still I want code analysis when building before check-in, and also I want our Build Server (Cruise Control) to continue running with Code analysis enabled.
I'd prefer if code analysis is running from within Visual Studio, so I can jump directly to the source code if I get an error/warning.
Here's how we do it:
We do our normal development in Debug mode, and simply have an informal rule that you must pass a Verify build before you check in.
This is easy to forget, but we run Continuous Integration (CI) on the Verify build, so if you check in code that has Code Analysis warnings, you break the build - so people quickly learn to do a manual Verify build before checking in :)
You can also just use Debug without CA and Release with CA, but since enabling CA defines the CODE_ANALYSIS constant, it means that CA Suppressions will be included in the IL, and I prefer not having that in my Release binaries (YMMV).
We had that sort of problem with our stuff. We just got everyone quad 64bit processors and between 8 an 16GB ram. Plus we tried to limit the number of projects at any one point. Not the most graceful solution but it helped a lot.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With