Domanda

In our project we're heavily relying on FxCop as code quality tool. Recently we split our project from 8 modules to over 30 modules ("projects" in MS terms). Since then the build time with enabled code analysis (FxCop) exploded.

Obviously the repeated startups of FxCop for each module imposes a significant overhead on the whole build. Any hints how to improve this annoying experience for my developers?

È stato utile?

Soluzione

My preferred approach for this sort of thing is to add a build configuration to the solution in which static analysis is disabled (e.g.: "Debug (Compile Only)"). Developers can choose to use this for routine local builds, although they are required build under the full "Debug" configuration before committing to shared source control. (Ideally, a continuous integration build would run the full screening to catch any failures to do so.)

Another option would be to remove the per-project code analysis configuration and instead invoke fxcopcmd.exe for all your assemblies together. Unfortunately, figuring out where to trigger this is somewhat trickier than setting up the command line. If you have a single top-level executable, its build might be a decent candidate.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top