FxCop installation

2019-03-18 18:30发布

I am trying to get latest version of FxCop. I am using Visual Studio 2010 Professional edition which does not include code analysis, so I am trying to set it up using FxCop.

At http://www.microsoft.com/en-us/download/details.aspx?id=6544 there is readme file whic says to install Windows SDK which includes latest FxCop. I've installed Windows SDK from here http://www.microsoft.com/en-us/download/details.aspx?id=8442 and it does not include FxCop at all, I have checked both x86 and x64 versions.

Any idea where can I find it? Is FxCop supported by Microsoft any more?

EDIT: I did full installation of Windows SDK. I am installing x86 version on Windows 7 x86. I have searched in x64 Windows SDK ISO for FxCop only by extracting it into folder.

The only place I found FxCop 10 is in answer https://stackoverflow.com/a/7151981/84852

3条回答
Viruses.
2楼-- · 2019-03-18 19:02

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.

but I found it in

C:\Program Files\Microsoft SDKs\Windows\v6.0A\FXCop

查看更多
乱世女痞
3楼-- · 2019-03-18 19:22

Since FxCop 10.0 is distributed as part of Windows 7 SDK, you have to do some download and extractions to install it on servers which are not running Windows 7.

Any idea where can I find it? Is FxCop supported by Microsoft any more?

You can download the file directly from here: https://fxcopinstaller.codeplex.com/

This project is not created by Microsoft. I made it just for saving you and other people a few steps of extracting the binary from the original package. I did not change anything in the original MSI file provided by Microsoft. I also don't accept any contributor's upload to keep the file genuine.

[UPDATE]

Codeplex is shutting down. New location is www.fxcopinstaller.com.

查看更多
小情绪 Triste *
4楼-- · 2019-03-18 19:22

I have the folder C:\Program Files\Microsoft SDKs\Windows\v7.0A\FXCop in my SDK install, however it is for the older version of FxCop. I also have the setup for the latest version of FxCop, but I can't remember where I found it, and its just as easy for you to download it from that other question.

However these days I follow the instructions detailed on this blog post because the FxCop command line runner produces different results than the IDE Code Analysis runner (namely because FxCop doesn't support the new phoenix engine), and I wanted my build server to enforce the same rules as were run in the IDE.

This procedure also gave me the ability to relax the rules for my unit test projects (there is an issue in VS2010 whereby the ruleset configured for the first project built became the ruleset for all projects, regardless of what was configured).

UPDATE

If required, this Code Analysis Team blog post says that the FxCop 10.0 setup is included in Microsoft Windows SDK for Windows 7 and .NET Framework 4 Version 7.1 and can be found in the folder %ProgramFiles%\Microsoft SDKs\Windows\v7.1\Bin\FXCop.

查看更多
登录 后发表回答