Note that there are some explanatory texts on larger screens.

plurals
  1. PORun FxCop against ASP.net web-site?
    text
    copied!<p>How can I run FxCop against an ASP.net Web-site?</p> <h2>Background</h2> <p>I have an ASP.net Web-site that I want to run FxCop against.</p> <p><strong>Note</strong>: I have an ASP.net web-site, not an ASP.net web-application, that I want to run FxCop against. </p> <p>How can I run FxCop against an ASP.net web-site in Visual Studio 2010 Professional?</p> <hr> <p><a href="http://social.msdn.microsoft.com/forums/en-US/asmxandxml/thread/737febfb-c142-4056-bf82-728d58ce8760" rel="nofollow noreferrer">Some people suggest</a> that it's very simple: just right-click the web-site project, and click <strong>Run Code Analysis on Web Site</strong>:</p> <blockquote> <p>The process it very simple.... just right click on the web site project and "Run Code Analysis on Web Site"</p> </blockquote> <p>What they ignore is that <a href="http://social.msdn.microsoft.com/forums/en-US/asmxandxml/thread/737febfb-c142-4056-bf82-728d58ce8760" rel="nofollow noreferrer">no such option exists</a>:</p> <p><img src="https://i.stack.imgur.com/XlLkt.png" alt="enter image description here"></p> <hr> <p>I also tried <strong>Tools</strong> menu -> <strong>FxCop</strong>. But of course that doesn't work because its command line options:</p> <pre><code>FxCopCmd.exe /c /f:$(TargetPath) /d:$(BinDir) /r:"C:\Program Files (x86)\Microsoft Fxcop 10.0\Rules" </code></pre> <p>Doesn't make sense for web-sites.</p> <hr> <p><a href="http://www.webpronews.com/using-fxcop-with-aspnet-2006-12" rel="nofollow noreferrer">Someone has suggested</a>, correctly, that it's not possible, because there is no assembly for FxCop to validate:</p> <blockquote> <p>The build process in ASP.NET 2.0 is very different than in ASP.NET 1.x, because it does not produce a dll file.</p> <p>That means that you cannot use FxCop because it can only work with dll and exe file types.</p> </blockquote> <p>That means that short of compiling the entire web-site into an assembly, you cannot run FxCop against an ASP.net web-site.</p> <p>How can I run FxCop against an ASP.net web-site?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload