Sonarqube 如何从FxCopCmd中删除/aspnet参数(错误CA0001)

Sonarqube 如何从FxCopCmd中删除/aspnet参数(错误CA0001),sonarqube,sonar-runner,fxcopcmd,Sonarqube,Sonar Runner,Fxcopcmd,我试图在SonarQube 4.5.1上使用FxCop,但FxCopCmd失败 问题是,当SonarQube创建FxCopCmd调用时,他添加了参数/aspnet。由于我的程序是一个Web项目而不是一个网站,因此此参数导致4个分析工程师异常: C:\Program Files\Microsoft Fxcop 10.0>FxCopCmd.exe/file:G:\sbs1\workspace\Projeto2\DCX.ITLC.Web\bin\DCX.ITLC.Web.dll/ruleset:=G:

我试图在SonarQube 4.5.1上使用FxCop,但FxCopCmd失败

问题是,当SonarQube创建FxCopCmd调用时,他添加了参数/aspnet。由于我的程序是一个Web项目而不是一个网站,因此此参数导致4个分析工程师异常:

C:\Program Files\Microsoft Fxcop 10.0>FxCopCmd.exe/file:G:\sbs1\workspace\Projeto2\DCX.ITLC.Web\bin\DCX.ITLC.Web.dll/ruleset:=G:\sbs1\workspace\Projeto2\target\sonar\Projeto2\u Projeto2\u DCX.ITLC.Web\Fxcop-sonaqube.ruleset/out:G:\sbs1\workspace\Projeto2\target\sonar\Projeto2\u DCX.ITLC.Web\Fxcop-report.xml/output:none/searchgac/aspnet

如果在没有/aspnet参数的情况下执行相同的调用,FxCopCmd将正常运行:

C:\Program Files\Microsoft Fxcop 10.0>FxCopCmd.exe/file:G:\sbs1\workspace\Projeto2\DCX.ITLC.Web\bin\DCX.ITLC.Web.dll/ruleset:=G:\sbs1\workspace\Projeto2\target\sonar\Projeto2\u Projeto2\u DCX.ITLC.Web\Fxcop-sonaqube.ruleset/out:G:\sbs1\workspace\Projeto2\target\sonar\Projeto2\u DCX.ITLC.Web\Fxcop-report.xml/output:none/搜索GAC

我使用的组件有: -SonarQube 4.5.1 -Visual Studio项目1.2的分析引导程序 -C 3.3


我想找到一种方法来禁用SonarQube上的/aspnet参数。任何帮助都将不胜感激。

确实,FxCop 10在/aspnet开关方面有一些问题。与Visual Studio 2013捆绑的FxCop版本12正确地处理了该切换

您描述的问题是一个已知问题,截至今天尚未解决,但有一张罚单:


在很短的时间内,您可以在FxCopCmd.exe周围创建一个包装来去除标志。

Hi,我们使用的是VS2010,因此不能使用FxCop 12。如何围绕FxComCmd.exe创建包装器?我是否必须创建另一个exe并在内部调用FxComCmd.exe?感谢@Mait这个问题已经很老了:现在建议使用SonarQube Scanner for MSBuild来分析C项目,如果您想使用FxCop,这将需要Visual Studio 2015。
Microsoft (R) FxCop Command-Line Tool, Version 10.0 (10.0.30319.1) X86
Copyright (C) Microsoft Corporation, All Rights Reserved.

Loaded designrules.dll...
Loaded globalizationrules.dll...
Loaded interoperabilityrules.dll...
Loaded mobilityrules.dll...
Loaded namingrules.dll...
Loaded performancerules.dll...
Loaded portabilityrules.dll...
Loaded securityrules.dll...
Loaded securitytransparencyrules.dll...
Loaded usagerules.dll...
Loaded DCX.ITLC.Web.dll...
Initializing Introspection engine...
An unhandled exception was encountered during GlobalBeforeAnalysis:
...
Analysis Complete.
* 4 total analysis engine exceptions.
Writing report to G:\sbs1\workspace\Projeto2\target\sonar\projeto2_projeto2_DCX.
ITLC.Web\fxcop-report.xml...
Done:00:00:01.4219205
Microsoft (R) FxCop Command-Line Tool, Version 10.0 (10.0.30319.1) X86
Copyright (C) Microsoft Corporation, All Rights Reserved.

Loaded designrules.dll...
Loaded globalizationrules.dll...
Loaded interoperabilityrules.dll...
Loaded mobilityrules.dll...
Loaded namingrules.dll...
Loaded performancerules.dll...
Loaded portabilityrules.dll...
Loaded securityrules.dll...
Loaded securitytransparencyrules.dll...
Loaded usagerules.dll...
Loaded DCX.ITLC.Web.dll...
Initializing Introspection engine...
Analyzing...
Analysis Complete.
Writing report to G:\sbs1\workspace\Projeto2\target\sonar\projeto2_projeto2_DCX.ITLC.Web\fxcop-report.xml...
Done:00:00:02.2656975