Partager via


Running FxCop over ASP.NET 2.0 Web Sites

Mads Kristensen has posted an easy solution to the problem of running FxCop over ASP.NET 2.0 web sites

There are a couple of things that I want to add to his post:

  1. When you run FxCop over the published assemblies, make sure you pass the /asp switch (this is only available in FxCop 1.35). This prevents the rules (in particular the design and naming categories) from being noisy over the ASP.NET plumbing that is generated by the ASP.NET Compiler. Unfortunately, there is no option with the FxCop UI to enable this, so you will need to analyze these assemblies using FxCopCmd.exe.
  2. As Mads touched on, Visual Studio 2005 Team System, Team Developer and Team Suite in particular, do not suffer from this problem. Both of the these editions ship with Code Analysis and support analyzing Web Sites Projects out-of-the-box. While this behavior will not change for Web Site Projects in Orcas, starting in Visual Studio 2005 SP1, the new Web Application Projects solve this by generating an output assembly similar to other MSBuild-based projects and what was available in Visual Studio 2003.

Thanks Mads for the post!

Comments

  • Anonymous
    January 31, 2007
    I'm glad you liked it.