FxCop Members

MSBuild

Uses FxCop to analyse managed code assemblies and reports on their design best-practice compliance.


The following tables list the members exposed by FxCop.

Public Constructors

  Name Description
Public method FxCop Initializes a new instance of the FxCop class.
Top

Public Properties

  Name Description
Public property AnalysisReportFileName Specifies the file name for the analysis report.
Public property ApplyOutXsl Applies the XSL transformation specified in /outXsl to the analysis report before saving the file.
Public property BuildEngine Gets or sets the instance of the IBuildEngine object used by the task. (inherited from Task)
Public property ConsoleXslFileName Specifies the XSL or XSLT file that contains a transformation to be applied to the analysis output before it is displayed in the console.
Public property DependencyDirectories Specifies additional directories to search for assembly dependencies. FxCopCmd always searches the target assembly directory and the current working directory.
Public property DirectOutputToConsole Directs analysis output to the console or to the Output window in Visual Studio .NET. By default, the XSL file FxCopConsoleOutput.xsl is applied to the output before it is displayed.
Public property ExitCode Gets the returned exit code of the executable file. (inherited from ToolTask)
Public property FailOnError Gets or sets a value indicating whether the build should fail if static code analysis reports errors. Defaults to true.
Public property HostObject Gets or sets the host object associated with the task. (inherited from Task)
Public property ImportFiles Specifies the name of an analysis report or project file to import. Any messages in the imported file that are marked as excluded are not included in the analysis results.
Public property IncludeSummaryReport Includes a summary report with the informational messages returned by FxCopCmd.
Public property Log Gets an instance of a TaskLoggingHelper class containing task logging methods. (inherited from Task)
Public property OutputXslFileName Specifies the XSL or XSLT file that is referenced by the xml-stylesheet processing instruction in the analysis report.
Public property PlatformDirectory Specifies the location of the version of Mscorlib.dll that was used when building the target assemblies if this version is not installed on the computer running FxCopCmd.
Public property ProjectFile Specifies the filename of FxCop project file.
Public property RuleLibraries Specifies the filename(s) of FxCop rule assemblies
Public property Rules The list of rules to run
Public property SaveResults Saves the results of the analysis in the project file.
Public property TargetAssemblies Specifies the target assembly to analyze.
Public property Timeout Gets or sets the amount of time after which the task executable is terminated. (inherited from ToolTask)
Public property ToolPath Gets or sets the path of the executable file to run. (inherited from ToolTask)
Public property TypeList Comma-separated list of type names to analyze. This option disables analysis of assemblies, namespaces, and resources; only the specified types and their members are included in the analysis. Use the wildcard character '*' at the end of the name to select multiple types.
Public property Verbose Gets or sets a value indicating whether the output is verbose.
Public property WorkingDirectory Gets or sets the working directory.
Top

Protected Properties

  Name Description
Family property EnvironmentOverride Gets the override value of the PATH environment variable. (inherited from ToolTask)
Family property HelpKeywordPrefix Gets or sets the prefix used to compose Help keywords from resource names. (inherited from Task)
Family property ResponseFileEncoding Gets the Encoding of the response file. (inherited from ToolTask)
Family property StandardErrorEncoding Gets the Encoding of the standard error stream of the task. (inherited from ToolTask)
Family property StandardErrorLoggingImportance Gets the MessageImportance with which to log errors. (inherited from ToolTask)
Family property StandardOutputEncoding Gets the Encoding of the standard output stream of the task. (inherited from ToolTask)
Family property StandardOutputLoggingImportance Gets the MessageImportance with which to log errors. (inherited from ToolTask)
Family property TaskResources Gets or sets the culture-specific resources associated with the task. (inherited from Task)
Family property ToolName Overidden. Gets the name of the executable file to run.
Top

Public Methods

  Name Description
Public method Equals Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method Execute Overidden. Executes the task.
Public method GetHashCode Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method GetType Gets the Type of the current instance. (inherited from Object)
Public method ToString Returns a String that represents the current Object. (inherited from Object)
Top

Protected Methods

  Name Description
Family method CallHostObjectToExecute Calls the host object to perform the work of the task. (inherited from ToolTask)
Family method ExecuteTool Creates a temporoary response (.rsp) file and runs the executable file. (inherited from ToolTask)
Family method Finalize Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Family method GenerateCommandLineCommands Overidden. Returns a string value containing the command line arguments to pass directly to the executable file.
Family method GenerateFullPathToTool Overidden. Returns the fully qualified path to the executable file.
Family method GenerateResponseFileCommands Returns a string value containing the command line arguments to add to the response (.rsp) file before running the executable file. (inherited from ToolTask)
Family method GetResponseFileSwitch Returns the command line switch used by the executable file to specifiy a response (.rsp) file. (inherited from ToolTask)
Family method GetWorkingDirectory Overidden. Returns the directory in which to run the executable file.
Family method HandleTaskExecutionErrors Handles execution errors raised by the executable file. (inherited from ToolTask)
Family method InitializeHostObject Initializes the host object of the task. (inherited from ToolTask)
Family method LogEventsFromTextOutput   (inherited from ToolTask)
Family method LogPathToTool Logs the tool name and path to all registered loggers. (inherited from ToolTask)
Family method LogToolCommand Logs the starting point of the run to all registered loggers. (inherited from ToolTask)
Family method MemberwiseClone Creates a shallow copy of the current Object. (inherited from Object)
Family method SkipTaskExecution Indicates whether task execution should be skipped. (inherited from ToolTask)
Family method ValidateParameters Overidden. Indicates whether all task paratmeters are valid.
Top

See Also

Syntax based on .NET Framework version 2.0.
Documentation version 1.0.0.0.