Using FxCop s Stand-Alone GUI


Using FxCop's Stand-Alone GUI

FxCop.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 Interface


In 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 Rules


To 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 Report


The 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.




.NET Internationalization(c) The Developer's Guide to Building Global Windows and Web Applications
.NET Internationalization: The Developers Guide to Building Global Windows and Web Applications
ISBN: 0321341384
EAN: 2147483647
Year: 2006
Pages: 213

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net