FxCopCmd /file:C:\WebSite\Hello\WorkingDirectory\Hello\bin\Hello.dll /ruleset:+"GlobalizationRules.ruleset" /rulesetdirectory:"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\Rule Sets" /directory:"C:\WebSite\Hello\WorkingDirectory\Hello\bin" /searchgac /out:C:\WebSite\DailyBuild.FxCop.xml
参数
/file表示要进行规范检查的程序集
/ruleset表示用于分析的规则集
/rulesetdirectory表示规则集的路径
/directory要搜索程序集依赖项的位置
/out检查结果文件位置
/searchgac在全局程序集中寻找程序集依赖项 (项目中引用的程序集)
FxCopCmd /file:C:\WebSite\Hello\WorkingDirectory\Hello\bin\ /ruleset:+"GlobalizationRules.ruleset" /rulesetdirectory:"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\Rule Sets" /directory:"C:\WebSite\Hello\WorkingDirectory\Hello\bin" /out:C:\WebSite\DailyBuild.FxCop.xml
当file写成路径时则会检测所配置路径下所有dll文件