第一步:打开外部工具引用窗口

 代码分析工具FxCop 10.0之二:与VS 2008的集成代码分析工具FxCop 10.0之二:与VS 2008的集成代码分析工具FxCop 10.0之二:与VS 2008的集成代码分析工具FxCop 10.0之二:与VS 2008的集成

第二步:添加FxCop工具菜单

代码分析工具FxCop 10.0之二:与VS 2008的集成

 

第三步:设定FxCop工具添加项内容

 代码分析工具FxCop 10.0之二:与VS 2008的集成

 

运行参数:https://msdn.microsoft.com/en-us/library/bb429449(VS.80).aspx

配置举例:

   VS2008-> Tools -> External Tools  

  Title : FxCop

    Command : D:\Program Files\Microsoft Fxcop 10.0\FxCopCmd.exe 

    Arguments : /c /p:"$(SolutionDir)\$(SolutionFileName).fxcop" /cXsl:"D:\Program Files\Microsoft Fxcop 10.0\Xml\VSConsoleOutput.xsl"

    Initial directory :D:\Program Files\Microsoft Fxcop 10.0

    选择 “Use Output window” 。

运行:Tools ->FxCop

第四步:生成.sln.fxcop文件

打开FxCop GUI界面,可以通过”Add Targets”增加dll 

 

代码分析工具FxCop 10.0之二:与VS 2008的集成

设置Targets以后,可以选定需要的规则:

代码分析工具FxCop 10.0之二:与VS 2008的集成

Important: 

 - Save the project file in the same directory where your solution is. 

 - Project name must be the file name of your solution (including .sln extension).  For example: If your solution file is MySolution.sln, the FxCop project name must be MySolution.sln.FxCop. 

保存后如下图所示:

代码分析工具FxCop 10.0之二:与VS 2008的集成

 

第五步:运行

 代码分析工具FxCop 10.0之二:与VS 2008的集成

相关文章:

  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2021-05-17
  • 2022-12-23
  • 2021-10-22
猜你喜欢
  • 2022-12-23
  • 2022-01-05
  • 2021-07-10
  • 2021-07-03
  • 2022-12-23
相关资源
相似解决方案