sonarqube:SonarQube Scanner 2.3 for Visual Studio 2017 Builds - sonarqube

one of our feature teams who is using SonarQube since long and they are now getting issues when they upgrade to VS 2017,To support SonarQube for scanning in VSTS build, we need the task updated with SonarQube 2.3 or higher to support along with VS 2017 for code analysis. May I know is there any work going on this when can we get the support for VS 2017?

Regarding SonarQube extension in VSTS, you can install SonarQube 3.0.2 version. (You need to update SonarQube extension if old version has already been installed in manage/admin extension page of you VSTS. https://XXX.visualstudio.com/_admin/_extensions)
After that, you can change 3.* version of SonarQube Scanner for MSBuild task in build or release.

Related

SonarQube V4 plugin for VSTF 2017

I have just updated the SonarQube plugin to V4 in my VS2017 VNext build but the build is sat waiting for an available agent.
All my agents have MSBuild and Java, are there any other capabilities required for the V4 update.
If I move back to the V3 SonarQube plugin the same build works fines
v4 of the tasks do not add any new demands. However, the new version is written in Node.js rather than PowerShell (so it can run on non-Windows build agents). If you are running an on-premise version of TFS you might need to update your build agents.
FYI when I ran the v4 of the task on TFS2017.2 the build failed with the message No agent found in pool X which satisfies the specified demands: .... Agent.Version -gtVersion 2.119.1
The Microsoft docs for upgrading the agents are here. I ended up downloading the specified version of the agent from the vsts-agents releases page on GitHub.

SonarQube no longer detects C# issues

I upgraded my build agent to Visual Studio 2015 Update 3 and I noticed that C# code analysis issues are no longer reported.
I am using SonarQube 5.6
Bogdan, the same happened to me.
You need to upgrade your C# plug-in to be at least version 5.3.1
Indeed, Visual Studio 2015 Update 3 introduced a breaking change in the Static Analysis Result Interchange Format (SARIF) generated by the C#/VB compiler. As a result the C# plug-in could not find any issue any longer. SonarSource reacted quickly by providing a bug fix version (5.3.1)
Note that this should not happen again as now SARIF has moved to version 1.0 (that happened in VS 2015 Update 3, and its versioning will be fully supported moving forward)

No code coverage for .NET Projects when MSBuild SonarQube Runner is used

We are using sonarqube 5.1.1 version and faced issues while analyzing .NET projects using sonar-runner.
As the recent update says, sonar-runner does not support .NET projects anymore, we have installed MSBuild.SonarQube.Runner-1.0 to analyze the same.
We are able to create dashboards for the .NET projects now but unit test cases and unit test coverage is missing.
Could you kindly help us here?
Please note that we have enterprise license and all the existing .NET projects in production environment use Visual studio 2010.
I have upgraded the dev instance to check the feasibility.

Sonar runner + ReSharper getting message "ReSharper plugin is running in deprecated mode"

Configuration:
Sonar: V. 5.1.1.
C#-PlugIn: V. 4.0
ReSharper-PlugIn: V. 2.0
ReSharper-InspectCode: V. 9.1.1
I'm getting the message "ReSharper plugin is running in deprecated mode" even though I have configured it as recommended here.
Any suggestions what I am doing wrong here?
Short answer The mode where R# is executed by the SonarQube analyzer is going to be deprecated starting from next week.
Long [and boring] answer
The re-use reports mode will replace it, where you invoke inspectcode.exe yourself and provide the path to its report to the SonarQube analyzer.
The R# 2.0 plugin has been released to work with the MSBuild SonarQube Runner 1.0 which will be released next week.
The MSBuild SonarQube Runner will replace the Visual Studio Boostrapper plugin.
Now, the re-use reports mode of the R# 2.0 plugin only works with the MSBuild SonarQube Runner, and cannot be used with the Visual Studio Bootstrapper. This explains why we have to wait until the MSBuild SonarQube Runner is released before being able to officially deprecate the current mode.

How to resolve this unmet agent requirement: "DotNetFramework4.0_x86 exists"?

We have tried all options below, but it's not working.
We are using Visual Studio 2012 and Jetbrains Teamcity version 7.1
While configuring the agent I selected the runnert type as VisualStudio(sln) and when I configure and run the agent it says
Unmet requirements:DotNetFramework4.5_x86 exists
I went through all the steps explained in the below mentioned blogs and this didn't help. Please suggest me if any new solution is in place.
http://devnet.jetbrains.com/message/5316474
TeamCity - Unmet requirements: DotNetFramework4.5_x86 exists
Then link you posted is about Visual studio 2010(.net 4.0), Your using Visual studio 2012 which contains support for applications built in .net 4.5. Do you have .net 4.5 installed on the agent machine? Install .net 4.5 as unless yor trying to target builds not targeted at 4.5 and not building using 4.5 you need it (and if you were just set it to target vs2010 instead?).

Resources