locked
VS2012 Code Analysis Window Doesn't Work RRS feed

  • Question

  • I've been working on transitioning our team to VS2012 and I actually thought the Code Analysis window wasn't supposed to work if building any project that includes v4 tools and/or targeting .NET 4.0. All along, the CA window has been non functional and all CA related warnings or errors appear only within the Error List window. The top of the CA window permanently contains this message at the top...

    "The Code Analysis window does not support the platform mtoolset version of one or more projects. See the Error List for results from these projects."

    Just recently, I had to fix an issue on one my co-workers workstation and it dawned on me that the CA window works fine! I did some further tests and had no problems at all running CA, viewing the errors, etc. I went back to my workstation and can confirm that regardless as to which solution you're working with (IE .NET 4.5 only, .NET 4.0 only, mixture), it's simply broken.

    At the end of the day, I can create a brand new solution w/ just a .NET 4.5 Console, configure for CA, make a change that will generate CA warnings or errors, and the CA window will never update. All you will ever see are entries in the Error List window. Does anybody have any idea as to what might be happening? My environment includes VS2010 and VS2012 and my co-workers environment matches mine.


    Scott Parillo

    Sunday, December 2, 2012 4:35 PM

Answers

  • It should work. I have a solution with a .NET 2.0, 3.0, 3.5, 4.0 and 4.5 console app and Code Analysis reports to the Code Analysis window just fine.

    It might be that your .NET 4.5 SDK installation got corrupted by the installation order, sis you install oldest to newest? Try repairing the .NET 4.5 SDK and Visual Studio 2012.

    If that doesn't work, try unloading your projects one by one, run Code Analysis each time to figure out which project file is 'breaking' CA. If you've found one, compare it to the other projects. If you can't find what's different, share the project file with us.


    My blog: blog.jessehouwing.nl

    Sunday, December 2, 2012 5:51 PM

All replies

  • It should work. I have a solution with a .NET 2.0, 3.0, 3.5, 4.0 and 4.5 console app and Code Analysis reports to the Code Analysis window just fine.

    It might be that your .NET 4.5 SDK installation got corrupted by the installation order, sis you install oldest to newest? Try repairing the .NET 4.5 SDK and Visual Studio 2012.

    If that doesn't work, try unloading your projects one by one, run Code Analysis each time to figure out which project file is 'breaking' CA. If you've found one, compare it to the other projects. If you can't find what's different, share the project file with us.


    My blog: blog.jessehouwing.nl

    Sunday, December 2, 2012 5:51 PM
  • Jesse,

    Thanks for the response. I just want to re-emphasize the fact that I can spin up a totally new solution/project and see the same behavior. In my mind, this suggests that the problem isn't in our solutions/projects and something more general is causing the CA Window not to function when testing against any project(s).

    I agree that the problem is likely environmental, although I see no other issues. I'll give the repair a try and update with my findings.


    Scott Parillo


    Tuesday, December 11, 2012 2:19 AM
  • Hi Scott,

    Glad to receive your reply.

    I agree that the problem is likely environmental, although I see no other issues. I'll give the repair a try and update with my findings.

    Like Jesse’s suggestion, if possible, you could try to give a repair, I have marked Jesse’s reply as the answer, but if still no help, you could unmark it, and then please also feel free to share us the latest information about this issue. Thanks for your understanding.

    Have a nice day,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, December 11, 2012 5:31 AM
    Moderator