Thursday, July 10, 2014

Installation and Integration of FxCop with Visual Studio 2008 and perform Code Review using FxCop

Installation and Integration of FxCop with Visual Studio 2008 and perform Code Review using FxCop.


1. FxCop comes as a part of “Microsoft Windows SDK for Windows 7 and .NET Framework 4 version 7.1”. Install MS-SDK for Win7 from: http://www.microsoft.com/en-us/download/confirmation.aspx?id=6544

2. After SDK installation, install FxCopSetup.exe Setup from location: 
        c:\ProgramFiles\Microsoft SDKs\Windows\v7.1\Bin\FXCop folder. 
(path may vary based on system)

3. After successful installation, go to Visual Studio --> tools Menu--> External tools

4. In the External tools popup, Click Add:
       i. Title: FxCop
       ii. Command: C:\Program Files\Microsoft FxCop 1.35\fxcop.exe 
                        (or wherever FxCop was installed) 
       iii. Click Ok.

5. Now, on tools Menu--> External tools--> click FxCop

6. FxCop popup opens.

7. Project menu --> Add Targets--> select the dll you want to analyse.

8. On left side of the FxCop popup, the ddl loads.

9. Press F5 key.

10. On the right side the analyse will get listed.

11. As per the company's requirement, we can fix/leave the items marked by FxCop.

No comments:

Post a Comment