Uses FxCop to analyse managed code assemblies and reports on their design best-practice compliance.
Namespace: MSBuild.Community.Tasks
Assembly: MSBuild.Community.Tasks (in MSBuild.Community.Tasks.dll)
Syntax
Example
Shows how to analyse an assembly and use an XSLT stylesheet to present the report as an HTML file. If the static anlysis fails, the build does not stop - this is controlled with the
parameter.
Copy Code | |
---|---|
<FxCop TargetAssemblies="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.dll" RuleLibraries="@(FxCopRuleAssemblies)" Rules="Microsoft.Design#CA1012;-Microsoft.Performance#CA1805" AnalysisReportFileName="Test.html" DependencyDirectories="$(MSBuildCommunityTasksPath)" FailOnError="False" ApplyOutXsl="True" OutputXslFileName="C:\Program Files\Microsoft FxCop 1.32\Xml\FxCopReport.xsl" /> |
Remarks
If you include the
file in you build project, the ItemGroup
is defined with the standard FxCop Rules Assemblies.
Inheritance Hierarchy
System.Object
Microsoft.Build.Utilities.Task
Microsoft.Build.Utilities.ToolTask
MSBuild.Community.Tasks.FxCop
Microsoft.Build.Utilities.Task
Microsoft.Build.Utilities.ToolTask
MSBuild.Community.Tasks.FxCop
Thread Safety
Public static (Shared in Visual Basic)staticShared members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
See Also
Documentation version 1.0.0.0.