locked
Code Analysis not working when run on a website project RRS feed

  • Question

  •  

    Hi,

     

    when i right click on my website and select to run code analysis i can see the website being compiled but nothing is being reported at the end. Solution consists of a website project, a class library project and a web deployment project. Running on VS2005 SP1 Team Edition. Code Analysis is enabled with all rules for the website.

     

    I can run the solution through our TFS build server and get the code analysis to run but i can't do it from within visual studio on my own computer.

     

    Solution has been upgraded from vs2003 to vs2005 a few years back.

     

    Any pointers?

    Thursday, May 8, 2008 12:08 PM

Answers

  •  

    Hi Schmidt,

     

    When you look at the output window, do you see the text "Running Code Analysis on Web Site"?

    Also, you can also look in %userprofile%\my documents\visual studio 2005\Projects\<website project name>\<website project name>\<some guid>\ and check if there is a CodeAnalysisLog.xml file.  If code analysis is run, then there should be an xml file.

     

     

    Brahmnes

    Tuesday, May 13, 2008 4:42 AM

All replies

  •  

    Hi Schmidt,

     

    When you look at the output window, do you see the text "Running Code Analysis on Web Site"?

    Also, you can also look in %userprofile%\my documents\visual studio 2005\Projects\<website project name>\<website project name>\<some guid>\ and check if there is a CodeAnalysisLog.xml file.  If code analysis is run, then there should be an xml file.

     

     

    Brahmnes

    Tuesday, May 13, 2008 4:42 AM
  • Hi Brahmnes,

     

    no i do not see the text "Running Code Analysis on Web Site".

     

    The solution consists of a solution, a website project, a web deployment project and a class library project. I can run the code analysis on the class library project just fine, just not on the website project.

     

    Wednesday, May 14, 2008 6:03 AM
  • Does it work if you create a new web site project and run code analysis on it?

     

     

    Wednesday, May 14, 2008 11:35 PM
  • Yes it does work if i create a new website with just a default.aspx file in it.

     

    I am guessing it has something to do with the project being upgraded from 1.1 to 2.0, but i am not sure, can't find any error logs or anything else resembling it.

    Thursday, May 15, 2008 6:06 AM
  • What configuration/platform is your upgraded project?  For the platform, is it currently "Any CPU"?  If you change it to ".NET", would it work?

     

    Brahmnes

    Sunday, September 7, 2008 4:00 AM
  •  

    The configuration is Debug and platform is .NET for the website I can't change it to anything else but this.
    Monday, September 8, 2008 5:32 AM
  • Make sure the user you have as Identity user in the web config has permission or just comment out line <identity impersonate="true"  in the web.config file.
    Thursday, March 18, 2010 12:43 AM