Using FxCop's Stand-Alone GUIFxCop.exe is a stand-alone GUI that can be used with the .NET Framework 1.1 and 2.0. Run FxCop.exe, and you will see the default user interface (see Figure 13.3). Figure 13.3. FxCop's GUI InterfaceIn the left pane, you can see a default FxCop project ("My FxCop Project"). FxCop projects are made up of a list of assemblies (called "Targets" in FxCop) and a list of rules. Rules are simply .NET classes that check the validity of any aspect of an assembly. If you click on the Rules tab, you will see a list of the built-in rules (see Figure 13.4). Figure 13.4. FxCop RulesTo see the stand-alone FxCop GUI in action, add the Windows Forms application created in the previous section to FxCop's list of targets (select Project, Add Targets... and select the newly built application's assembly (e.g., WindowsApplication1. exe). Click on the Analyze button in the toolbar. Figure 13.5 shows the result. Figure 13.5. FxCop Analysis ReportThe fifth item down on the right side is the entry "Identifiers should not have incorrect suffix". Double-click this line to get more information (see Figure 13.6). Figure 13.6. More Information
Correct the problem in the application, rebuild the application, and click Analyze again; the error is no longer reported. Clearly, there's more to FxCop than this, but now you should have an idea of what it is and how it works. |