Domanda

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:

  1. Open Visual Studio 2010
  2. Create a new "VB - ASP.NET Web Site" (not a WebApp)
  3. 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")

  4. Results have 0 errors and 49 warnings
  5. 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...
  6. Run code analysis for website (File Menu -> Analyze -> Run Code Analysis on Web Site) note that output shows nothing related to FxCop
  7. Results have 0 errors and 0 warnings

È stato utile?

Soluzione

The results of using an MSDN support ticket determined that code analysis is NOT supported when using IIS Express.

This msdn post is supposed to get updated with the information by Microsoft support personnel.

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