Since ASP.NET 2.0 compilation is different than the previous ASP.NET 1.x model, it is not obvious for web developers where are the DLLs to which the FxCop should be pointing to for analysis.
I have recently found this simple and effective solution posted http://www.madskristensen.dk/blog/Use+FxCop+With+ASPNET+20.aspx.
In the post you will see steps of how to do it.
What he suggests in simple words is to publish the web site to a folder which will make the visual studio copy the DLL files there and then point the FxCop to the DLLs there.
Note: if using the Visual studio team suite, no need to worry about this as the built in code analysis tool handles this issue transparently.
FxCop home page and downloads can be found at http://www.gotdotnet.com/Team/FxCop/
Leave a Reply