FxCop rules cannot be executed when starting MSBuild SonarQube Runner

We run into problems analyzing .NET projects using SonarQube 5.1.1.

Please note that FxCop rules are included at the quality profile level.

We use the MSBuild SonarQube Runner to analyze projects. But we encounter an error that says that the sonar.cs.fxcop.assembly file must be installed.

We encountered a similar problem with sonar-runner-2.4, but at this time this parameter can be passed using the sonar-project.properties file.

But since the sonar runner does not support .NET projects, we now use Runner SonarQube for MSBuild.

Could you kindly confirm how we can avoid these problems with the MSBuild SonarQube Runner and comply with the FxCop rules in .NET projects?

The C # plugin version is 4.1.

Please let me know if any further information is needed on our part.

We postponed the update of our Sonar due to this problem, since the project team is NOT OK with the FxCop rules disabled at the level of quality level.

Please help us fix this.

Thank you Sri Priyanka

+5
source share
1 answer

I think you should read http://www.sonarqube.org/easy-analysis-of-visual-studio-solutions-with-the-sonarqube-scanner-for-msbuild/ and http://docs.sonarqube.org / display / PLUG / C% 23 + Plugin .

Please note that you must run commands from the "Developer Command Prompt for Visual Studio 2013 or higher" ( http://docs.sonarqube.org/display/SONAR/Analyzing+with+SonarQube+Scanner+for+MSBuild ). Neither the DOS command line nor Windows PowerShell works because they do not set the correct variables.

Native FxCop support does not mean that it comes with MSBuild SonarQube Runner, but you need to install Visual Studio> = 2013.

In addition, I found that not only the .properties sonar project is outdated, but you must delete it to avoid strange behavior.

0
source

All Articles