Expand Minimize

FXC350201: Assembly should not contain problems which are detected with Microsoft FxCop

The assembly will be checked with Microsoft FxCop for potential problems (if the tool is installed).

CheckId FXC350201
TypeName FxCopAnalysis
Severity Error
Type Assembly

The rule will be executed if the tool FxCop is installed locally. If the tool will not be found the rule will throw an exception.

Important: Not all FxCop are applied. The analysis uses a subset of FxCop rules which are defined in file [SPCAFInstallation]/RuleSets/MSOCAF.ruleset. The file uses the same FxCop rules as MSOCAF (Microsoft SharePoint Online Code Analysis Framework) to provide similiar behaviour. You can override the used ruleset file by using the configuration parameter 'FxCopRuleSets' in the SPCAF ruleset file.

Name Description
FxCopExecutable Absolute or relative path to FxCop executable FxCopCmd.exe. By default SPCAF searches for FxCopCmd.exe at the typical installation locations of FxCop.
FxCopDirectories List of directories (separated by ';') in which FxCop searches for referenced assemblies.
FxCopRuleSets List of FxCop rule set files (separated by ';'). By default SPCAF uses the MSOCAF.ruleset to limit the number of applied rules to a recommended set for SharePoint.

To suppress this violation in managed code add the following attribute to the method which contains the instruction (available since SPCAF version v5.2). Learn more about SuppressMessage here.

// Important: Ensure to have #define CODE_ANALYSIS at the beginning of your .cs file
[SuppressMessage("SPCAF.Integration.FxCop.FxCop", "FXC350201:FxCopAnalysis", Justification = "Provide reason for suppression here")]
Disclaimer: The views and opinions expressed in this documentation and in SPCAF do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. SPCAF and RENCORE are registered trademarks of Rencore. All other trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.