Tuesday, August 23, 2016

Running Code Analysis on your Visual Studio solution

In previous versions of Visual Studio prior to Visual Studio 2015 (such as Visual Studio 2013), Code Analysis was not available to editions of Visual Studio lower than Premium edition.  However, with the release of Visual Studio 2015, Code Analysis is now available even with the Professional Edition!

Now that Code Analysis is available to a much wider audience of developers, you may be wondering how to perform Code Analysis on your solution or on your individual Visual Studio Projects.

You can run Code Analysis on your solution simply by right-clicking on your solution and selecting "Analyze-->Run Code Analysis on Solution":



You can then enable Code Analysis on individual projects by going into the Project Properties and selecting the tab for "Code Analysis":


Finally, you can suppress specific error messages and warnings from the Build log by selecting the "Build" tab and semicolon-delimiting the specific error messages and warnings you wish to suppress:



Lastly, you can view any Code Analysis Error Messages and Warnings directly from the Error List window:


To read more about Visual Studio Code Analysis, you can check out the following articles:



No comments:

Post a Comment