Analysis failing with error “No FxCop analysis has been performed on this project, whereas it contains cs files”

送分小仙女□ 提交于 2019-12-12 10:14:20

问题


After upgrading to SonarQube 6.7 LTS, many of our projects started failing during "complete SonarQube analysis" task with below error:

[error]java.lang.IllegalArgumentException: No FxCop analysis has been performed on this project, whereas it contains cs files: Verify that you are using the latest version of the SonarQube Scanner for MSBuild, and if you do, please report a bug. In the short term, you can disable all FxCop rules from your quality profile to get rid of this error.

These projects have codeanalysis enabled and produce proper fxcop results.

SonarQube version: 6.7 LTS SonarC# plugin version: 6.6 SonarQube MSBuild Runner: 4.0

Can someone let me know if this is known or any way to find the actual cause of the issue.


回答1:


Support for executing FxCop was dropped in v4.0 of the Scanner for MSBuild - see SONARMSBRU-338 for more information.

However, this change should not cause the analysis to fail with the latest version of the sonar-fxcop plugin. Check the version of the sonar-fxcop that you have installed. I can reproduce the error using v1.0 of the plugin, but not with v1.1 or v1.2.




回答2:


this was fixed with Version 1.3 of the FxCop Plugin. But you Need to set some additional parametes, please see the readme.md of the plugin Project: https://github.com/DanielHWe/sonar-fxcop



来源:https://stackoverflow.com/questions/47750986/analysis-failing-with-error-no-fxcop-analysis-has-been-performed-on-this-projec

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!