views:

67

answers:

3

I am very impressed with the Microsoft Code Contracts.

Unfortunately the static analysis is only available in Visual Studio 2008 Team System and Visual Studio 2010 Premium.

We are happily using Visual Studio 2008 Professional (_**without**_ MSDN). Upgrading our Visual Studio license from pro to premium is way to expensive.

Is there a good alternative?

A: 

The compiler that comes with the platform SDK has static analysis for free. cl /analyze. You can configure your IDE to use it.

Alex
+1  A: 

Take a look at the MSDN Ultimate Offer for Devs. It's not cheap, but it's a lot less expensive than 2008 Team Suite. Then you can use Visual Studio 2010 from now on with Code Contracts. :)

Also, Code Contracts is different from FxCop, where the latter is what everyone is going to think you're talking about when you say "static code analysis."

280Z28
A: 

I personally use the following tools to help with my code analysis needs:

CodeIt.Right can be used as an analysis tool.
FxCop quite extensive and thorough and also free
CAT tool 1.1 is a simple tool to help identify security flaws in managed code.

Concerning code contracts, take a look at DevLabs portal and click on the "Projects" link to link you to the Code Contracts project available for Visual Studio 2008 and Visual Studio 2010

Mike J