#223 – Enabling Code Analysis for Your Project
January 26, 2011 3 Comments
If you’re using Visual Studio 2010, the Ultimate and Premium versions come with a built-in code analysis tool, which allows you to check your code for potential problems. Code analysis will check your code at the time that you build it, looking for logic errors or common mistakes.
To turn code analysis on at build-time, do the following. Right-click your project in the Solution Explorer and select Properties.
Click on the Code Analysis tab.
Check the box labeled Enable Code Analysis on Build.
The next time that you build your project, the code analysis tool will check it for the problems covered by the Microsoft Basic Correctness Rules rule set. Any problems found will be reported as Warnings in the Error List window.
Good areticle Sean. Code Analysis is such an unused feature I believe, but such a necessary one. I have been writing recently about the benefits of code analysis and would appreciate your comments. http://tribalthirst.com
Thanks Mark. Tribalthirst looks good–I’ll add it to my blog roll.
–Sean
Pingback: Tweets that mention #223 – Enabling Code Analysis for Your Project « 2,000 Things You Should Know About C# -- Topsy.com