I needed to get FxCop on my machine today, but I had no idea where to get it, so just Googled 'FxCop'. The first result was
this Msdn page that had lots of info on FxCop but no download link. I scanned the text and found a link to what was referred to as 'the FxCop website' for "support, updated documentation
and new rule topics". Note that this does not say "downloads", but I tried my luck anyway. What was falsely claimed as being the FxCop website was actually a nonexistant page on Microsoft Downloads that said "no results found for
downloads details aspx familyid 9AEAA970 F281 4FB0 ABA1 D59D7ED09772 displaylang en"
which doesn't make any sense whatsoever.
I then Googled some more and found the
Code Analysis Team Blog. Sounds about right, doesn't it? It looked like the right place, because if a code analysis tool like FxCop doesn't come from the Code Analysis Team then where else would it come from? My hunch was apparently proven correct because
I saw a big FxCop link in the tag cloud. Imagine my surprise when the most recent post tagged 'FxCop' was from november 2008. The third post in the list of results was the announcement of the release of FxCop 1.36, which I had learned (and assumed from the
2008 date) was not the latest version.
Angry and frustrated, I returned to Microsoft Downloads and searched for FxCop,
which that MSDN page could have done in the first place if it was going to send me to Microsoft Downloads anyway instead of where it said it would send me and wasn't daft enough to search for part of a url instead of the product I was looking for.
My search initially seemed disastrous: the first search result was neither the most recent, nor the most relevant, nor the most popular, so
obviously they made it the top search result. Incidentally, it makes total sense that you should sort your results on
least popular result first by default.
My pulse quickened, however, when I saw the second search result simply titled "FxCop 10.0". The version on the Code Analysis Team Blog was apparently more obsolete than I had first imagined since we've apparently had nine major version changes since that
time. Happily, I clicked the link and got sent to a download page, ready to finally download and install what I could only assume was the latest version of FxCop.
Alarmingly, the download didn't prove to be for an .msi or .exe or even .zip file. In fact, it was not a download for FxCop 10.0 at all, despite what the download page claimed. It was a download for a textfile called "readme.txt". Baffled, I opened the text
file and found what were amusingly titled "FxCop installation instructions."
FxCop Installation Instructions
1. Download the Microsoft Windows SDK for Windows 7 and .NET Framework 4 version 7.1.
2. Run %ProgramFiles%\Microsoft SDKs\Windows\v7.1\Bin\FXCop\FxCopSetup.exe to install FxCop.
Yes, the download for FxCop was actually a download for a text file that told me I had to go somewhere
else and download something entirely different. It could've said this on the webpage, but why take advantage of this 20 year old medium if you can also just make people download a text file. Note also that it doesn't exactly tell me
where to download the Windows SDK, just that I should go do it. It kind of felt like a huge ANSI bird was being flipped at me, but then again if there
had been a url in there it would probably have sent me to another nonexistant Microsoft Downloads page again.
Also note how the installer for the SDK doesn't actually install FxCop, but
installs an installer that you can use to then install FxCop.
I fortunately found a link to the SDK on the 'thank you for downloading' page, under 'related links'. This is kind of a misnomer, because it was not really a
related link, but more the actual link to what I was told I was going to download in the first place.
The installer fortunately provided me a way to customize the install. Since I only wanted FxCop, I unchecked everything and then looked for the "FxCop Installer" checkbox. This was foolish, because there obviously wasn't going to be a thorough description
of the items you could install. In the end I assumed it must be in the 'Tools' option under '.NET Development', because it sure wasn't going to be under 'Native Code Development' or 'Redistributable Packages' and none of the options under 'Common Utilities'
seemed like they would be it. In an amazing stroke of luck, this later proved to be correct.
I ran the installer for FxCop - I mean, I ran the installer for the installer for FxCop - and sure enough, when it had finished and I had manually searched through
a bin directory in program files, there it was: fxcopsetup.exe. I ran it and lo: FxCop 10.0 is now happily buzzing away on my system. I still had to uninstall the SDK - something I hadn't wanted to install in the first place - but that seemed trivial
in the light of my ultimate succes, even if it consisted of uninstalling the SDK and
then uninstalling the stray Visual C++ 2010 redistributable it had left behind on my system.
So let's recap: after several fruitless searches broken pages and misinformation, I had found what I was led to believe to be the installer for FxCop but was actually just a text file that told me what I needed to download but not where to download it, which
would install a piece of software that I would then have to run to install what I was told the text file was going to be in the first place. It is like a diabolical matryoshka doll of software, designed by satan himself with the sole intent of reducing those
who just want to check their coding standards to a shivering mess of tears and useless browser history.
Throughout that whole process, I was reminded of
that infamous Bill Gates email from 2003 in which he was futilely trying to download Movie Maker. I wonder what Bill thinks of the fact that somebody's endeavour to download a simple piece of software that ought to be readily available to anyone trying
to write decent code would be so fraught with peril, and that it would take that person twelve paragraphs and just over a
thousand words to describe what any reasonable person would expect to be a simple matter of "find website, download latest version, install".
Oh, remember how I said that FxCop was happily buzzing away on my system? That's.. not entirely true. When I had it check for updates - who knows, there might be an FxCop
20.0 by now - I got the message that FxCop was unable to check for updates because '--' was found in FxCop.exe.config where '>' should have been. This was apparently happening on line 81, a line that doesn't exist in a 64 line XML document. Maybe I
can find an updated config file on Microsoft Downloads...