Tuesday, August 10, 2010

[General-Dev] How to download FXCop 10.0 (Version after 1.36)

FXCop is a code analysis tool from Microsoft. It helps check your code against a number of pre-defined rules as well as giving you the ability to add your own. It has been around for a while and is a good way of making sure you write code in a clean style.

It might sound weird writing a blog post on how to download a simple piece of software, but it is a bit of a muck around to get this so here is how to do it.

First of all, Version 1.36 has been superseded by version 10. I guess this is to line up with Visual Studio 2010.

Secondly, you can no longer download the installer from Microsoft's website. In fact the download page for it, simply downloads a text file which tells you to download something else.

Here is what you need to do.

1. Download Microsoft Windows SDK for Windows 7 and .NET Framework 4

2. Run the installer, it is a web installer, when prompted all you need to install is ‘Tools’ under ‘.NET Development’ (note, if you install everything its a large download! If you want to install everything it might be best to get the ISO from Microsoft's website).

3. Once its installed, go to "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\FXCop\FxCopSetup.exe" and run the setup.

4. You will then have FxCop installed, on 64bit machines it is located in “C:\Program Files (x86)\Microsoft Fxcop 10.0”

Note that I ran into problems when I just copied the fxcopsetup.exe onto other machines, had a dll error, installing the ‘tools’ from the web installer fixed that, so I guess this is why they haven’t just uploaded fxcopsetup.exe

Hope this helps you to not become as frustrated as this guy!

2 comments:

Arthur Zubarev said...

I downloaded and installed the needed SDK, however the FXCop folder is not there. What is wrong?

Anonymous said...

Works perfect! Thanks