Why is code analysis different from Cassini and IIS Express for websites?

PRODUCT DETAILS

We are moving to using IIS Express instead of Cassini, and I noticed that Code Analysis does not return the same results. On one site we have where we started using code analysis at the end of the game, the results are 423 warnings from Cassini VS. 6 alerts with IIS Express.

Interestingly, on the VB ASP.NET website by default without any changes, the results are 49 warnings with Cassini VS. 0 alerts with IIS Express.

Can someone explain this.

PLAYBACK QUESTIONS:

  • Open Visual Studio 2010
  • Create a new "VB Website - ASP.NET" (not WebApp).
  • Analysis of the startup code for the website (File menu → Analysis → Analysis of the startup code on the website)
    note that displays:

    Code analysis on the website 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 " \ 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 [MyUser Name] \ 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 the site to use IIS Express (right-click in the solution explorer along the path and select "Use IIS Express ...") accept pop-ups and wait for the solution driver to change the path to http:// localhost...
  • Analysis of the startup code for the website (File menu → Analysis → Analysis of the execution code on the website) note , this output does not show anything related to FxCop
  • Results have 0 errors and 0 warnings.
+6
source share
1 answer

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

This msdn post should update with information provided by Microsoft support staff.

0
source

Source: https://habr.com/ru/post/923396/


All Articles