8
votes

I have just installed Visual Studio 2008 on a Virtual PC to evaluate it and one of the features I want to try out is the Code Analysis.

However I can't seem to find it anywhere, on MSDN it says you can right click on a project and select properties and then simply enable it from there. However I don't see this option anywhere.

At first I thought it may be because I converted a 2005 ASP.NET project targeting .NET 2.0 however as a Test I created a dummy 3.5 project but with still no luck

Has anyone else come across this?

EDIT: I am currently using Visual Studio 2008 SP1 and working on VB.NET/ASP.NET projects

4

4 Answers

10
votes

Code Analysis is only in the Team System versions of Visual Studio. All others only come with unit testing.

4
votes

Code Analysis is only in some editions.

An old version of code analysis, FxCop, is still a free download.

2
votes

Are you evaluating a Professional or a larger (i.e. Team System) edition? As far as I know, Code Analysis is simply not included in Professional and smaller editions.

0
votes

It seems that the code analysis is only removed from the GUI of these Visual Studio versions.
When using Visual Studio Express 2008, and the project file contains under the sections
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == ... the line
<RunCodeAnalysis>true</RunCodeAnalysis>
the code analysis will run for corresponding project configuration.
On my machine, that means that file at C:\Program Files (x86)\Microsoft Visual Studio 9.0\Team Tools\Static Analysis Tools\FxCop\FxCopCmd.exe is being executed with a lot of arguments and its output is automatically directed into warnings pane.
So, maybe the FxCop has to be separately installed, but besides that even the VS Express seems to support the code analysis tool.