Check out FxCop for .NET managed code assemblies

Managed code is program code that runs as part of the Common Language Runtime in a .NET environment. This gives such code access to automatic memory management, helps to ensure some degree of platform neutrality and enables simplified cross-language integration. In different terms, managed code is code that conforms to the .NET Framework, runs inside the .NET environment, and can use .NET managed facilities. If you want to learn more about why using managed code for .NET development is so important, check out the article at DataDirect entitled The Importance of Using Managed Code in .NET Development (and if you're really gung-ho, follow the numerous links available in that article's "Advantages of Managed Code" links section).

All this begs the question, "How can developers be sure that their code conforms to the .NET Framework and so forth?" That's where FxCop comes into play.

You'll find this excellent (and free) tool online at Microsoft's GotDotNet.com site on the FxCop Team Page. Implementations for both Versions 1.1 and 2.0 of the .NET Framework are available for there, and well worth checking out. Both GUI and command line versions of the tool are included among the executables that will be installed for either one. You'll also find a useful Readme file there and a somewhat dated but still valuable help file there as well (FxCop.chm is available only for version 1.32.0, which corresponds to the .NET Framework 1.1 version of FxCop itself). You can also find pointers to documentation and sample files there as well, to help you understand how to make use of the tool.

What the tool does is to inspect managed code assemblies and apply various types of tests—including reflection, MSIL parsing, and callgraph analysis—to inspect them for over 200 defects that might occur in one or more of the following areas:

More .NET add-ins
Mike Gunderloy's choice Windows developer downloads

  • Library design
  • Code localization
  • Naming conventions
  • Performance
  • Security
    There's even an active FxCop Managed Code Analysis Forum on MSDN where interested (and actual) users can turn for information or help from FxCop developers, experts, and other experienced users. The FxCop blog appears to be an extremely rich body of information and is even cited repeated for answers in the FxCop FAQ itself.

    Those who build managed code assemblies for .NET will find FxCop worth downloading, learning and using. Be sure to check it out.

    Ed Tittel is a full-time writer and trainer whose interests include XML and development topics, along with IT Certification and information security. Send comments, queries, or suggested topics or tools for review to Ed at etittel@techtarget.com.

    This was first published in April 2006

  • There are Comments. Add yours.

    TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

    REGISTER or login:

    Forgot Password?
    By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
    Sort by: OldestNewest

    Forgot Password?

    No problem! Submit your e-mail address below. We'll send you an email containing your password.

    Your password has been sent to:

    Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.