ISSUE DETAILS
We're moving to use IIS Express instead of Cassini and I noticed that Code Analysis isn't returning the same results. On one site we have where we started using code analysis late in the game the results are 423 warnings with Cassini VS. 6 warnings With IIS Express.
Interestingly, on a default VB ASP.NET Web Site without any modifications, the results are 49 warnings with Cassini VS. 0 warnings With IIS Express.
Can someone please explain this.
ISSUE REPRODUCTION:
- Open Visual Studio 2010
- Create a new "VB - ASP.NET Web Site" (not a WebApp)
- Run code analysis for website (File Menu -> Analyze -> Run Code Analysis on Web Site)
note that output shows:Running Code Analysis on Web Site C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\FxCopCmd.exe /o:"\[OurServer]\sys\user[MyUserName]\My Documents\Visual Studio 2010\Projects\AllLocalTest\AllLocalTest{38557EBD-D900-482B-B048-B527347036D1}\CodeAnalysisLog.xml" /asp /searchgac /ignoreinvalidtargets /forceoutput /successfile /ignoregeneratedcode /outputCulture:"1033" /r:"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\Rules" /rs:"=MinimumRecommendedRules.ruleset" /rsd:"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop..\Rule Sets" /f:"C:\Users[MyUserName]\AppData\Local\Temp\tmp94D6.tmp.cadir\bin\App_global.asax.dll" /f:"C:\Users[MyUserName]\AppData\Local\Temp\tmp94D6.tmp.cadir\bin\App_Web_303a5ti3.dll" /f:"C:\Users[MyUserName]\AppData\Local\Temp\tmp94D6.tmp.cadir\bin\App_Web_bwgrez5a.dll" /f:"C:\Users[MyUserName]\AppData\Local\Temp\tmp94D6.tmp.cadir\bin\App_Web_ruojygvq.dll")
- Results have 0 errors and 49 warnings
- change site to use IIS Express (right-click in solution explorer on path and select “Use IIS Express…” )
accept popups and wait for solution explorer to change path to
http:// localhost...
- Run code analysis for website (File Menu -> Analyze -> Run Code Analysis on Web Site) note that output shows nothing related to FxCop
- Results have 0 errors and 0 warnings