#225 – Free Static Analysis Using FxCop

Although code analysis can be extremely helpful, it’s available in only the Premium and Ultimate editions of Visual Studio 2010.  If you don’t have access to one of these editions but still want to be able to do some sort of static analysis, you can use the (free) FxCop tool.  FxCop used to be distributed separately, but is now part of the Windows SDK.

FxCop works by doing static analysis of your assemblies and looking for violations of programming and design rules.

Start by downloading and installing the Windows SDK.  After the install, you’ll see FxCop in your Start Menu.

After you start up FxCop, select Project | Add Targets and select the .dll or .exe file that you want to analyze.  Then click the Analyze button.

When analysis completes, you’ll see a list of messages indicating suggested changes.

Advertisement