FxCop
Encyclopedia
FxCop is a free static code analysis
tool from Microsoft
that checks .NET
managed code
assemblies
for conformance to Microsoft's .NET Framework Design Guidelines. Unlike the lint programming tool for the C programming language, FxCop analyzes the compiled object code
, not the original source code
. It uses CIL
parsing, and callgraph analysis to inspect assemblies for more than 200 different possible coding standards violations in the following areas:
FxCop includes both GUI
and command line versions of the tool. Microsoft Visual Studio 2005
and Visual Studio 2008
Team System Development Editions
both include a "Code Analysis" feature based on FxCop. For Visual Studio 2010 the corresponding, and slightly enhanced, static code analysis features are included in the Premium and Ultimate editions.
Static code analysis
Static program analysis is the analysis of computer software that is performed without actually executing programs built from that software In most cases the analysis is performed on some version of the source code and in the other cases some form of the object code...
tool from Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...
that checks .NET
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...
managed code
Managed code
Managed code is a term coined by Microsoft to identify computer program code that requires and will only execute under the "management" of a Common Language Runtime virtual machine ....
assemblies
.NET assembly
In the .NET framework, an assembly is a compiled code library used for deployment, versioning, and security. There are two types: process assemblies and library assemblies . A process assembly represents a process that will use classes defined in library assemblies...
for conformance to Microsoft's .NET Framework Design Guidelines. Unlike the lint programming tool for the C programming language, FxCop analyzes the compiled object code
Object file
An object file is a file containing relocatable format machine code that is usually not directly executable. Object files are produced by an assembler, compiler, or other language translator, and used as input to the linker....
, not the original source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...
. It uses CIL
Common Intermediate Language
Common Intermediate Language is the lowest-level human-readable programming language defined by the Common Language Infrastructure specification and is used by the .NET Framework and Mono...
parsing, and callgraph analysis to inspect assemblies for more than 200 different possible coding standards violations in the following areas:
- Correctness
- Library design
- Internationalization and localizationInternationalization and localizationIn computing, internationalization and localization are means of adapting computer software to different languages, regional differences and technical requirements of a target market...
- Naming conventionsNaming conventions (programming)In computer programming, a naming convention is a set of rules for choosing the character sequence to be used for identifiers which denote variables, types and functions etc...
- Performance
- Security
FxCop includes both GUI
Gui
Gui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...
and command line versions of the tool. Microsoft Visual Studio 2005
Microsoft Visual Studio
Microsoft Visual Studio is an integrated development environment from Microsoft. It is used to develop console and graphical user interface applications along with Windows Forms applications, web sites, web applications, and web services in both native code together with managed code for all...
and Visual Studio 2008
Microsoft Visual Studio
Microsoft Visual Studio is an integrated development environment from Microsoft. It is used to develop console and graphical user interface applications along with Windows Forms applications, web sites, web applications, and web services in both native code together with managed code for all...
Team System Development Editions
Visual Studio Team System
Visual Studio Application Lifecycle Management is a collection of integrated software development tools developed by Microsoft. These tools include IDEs, source control, work items, collaboration, metrics, and reporting tools.-Platform:...
both include a "Code Analysis" feature based on FxCop. For Visual Studio 2010 the corresponding, and slightly enhanced, static code analysis features are included in the Premium and Ultimate editions.
Overview
FxCop provides a tool to help developers to follow their company's coding standards. FxCop does code analysis to check whether the new code is compliant with the coding standards and naming conventions followed by the company. FxCop will ensure that the specified rules are used in the source code.External links
- Code Analysis tools (including FxCop)
- FxCop home page
- FxCop blog
- FxCop: Policing Code Correctness - Addison-Wesley
- FxCop v1.36 no longer available for download
- FxCop and Code Analysis: Writing Your Own Custom Rules
- FxCop: Downloading the most recent version
- FxCop 10.0
- FxCop 10 Install from CAB without installing Windows 7 SDK