pfeigl
(Philipp Feigl)
June 10, 2021, 7:19pm
1
Hi, we are using the latest stack of pretty much everything right now (sonarserver 8.9, sonarscanner for jenkins 2.13.1 with a pretty updated Jenkins installation as well).
When we try to setup sonarscanner msbuild in Jenkins, we do see the latest versions available based on this list: Releases · SonarSource/sonar-scanner-msbuild · GitHub
However, only net4.6 and core2/3 are shown. We would however like to install the net5.0 build which seems to be available.
This is how it looks like:
I saw this PR which seems to handle the same situation:
committed 07:58PM - 24 Feb 21 UTC
Since the MSBuild sonar scanner release 5 (https://github.com/SonarSource/sonar-… scanner-msbuild/releases/tag/5.0.0.23533) there is now officially support for .NET5 included in the releases. The crawler currently does not pick up or propagate the availability of .NET5 since it is not included in this groovy config. Adding the functionality here ensures the crawler publishes the availability of the new framework.
Separately, there may be a need to reconsider/refactor how the crawler works to take into account the changing nature of of framework version support coming from the sonar scanner for msbuild, so that manual updates and PRs like this aren't required each time there is a new .NET version.
Are we missing something or is there something you have to do to enable the net5.0 version to show up?
Thanks,
Philipp
pfeigl
(Philipp Feigl)
June 10, 2021, 7:28pm
2
I think I get a feeling on what’s wrong. Looking at this URL:
http://mirrors.jenkins-ci.org/updates/updates/hudson.plugins.sonar.MsBuildSonarQubeRunnerInstaller.json
which is referenced from your readme here
SonarQube Scanner for Jenkins
=============================
[](https://travis-ci.org/SonarSource/sonar-scanner-jenkins) [](https://next.sonarqube.com/sonarqube/dashboard?id=org.jenkins-ci.plugins%3Asonar)
This plugin allow easy integration of [SonarQube™](https://www.sonarqube.org/), the open source platform for Continuous Inspection of code quality.
Documentation: http://redirect.sonarsource.com/plugins/jenkins.html
Issue tracking: https://jira.sonarsource.com/browse/SONARJNKNS
If you want to make changes, please clone the [Git repository](https://github.com/SonarSource/sonar-scanner-jenkins).
With this plugin, you can configure SonarQube instances and run a SonarQube Scanner analysis in several ways:
* By injecting the SonarQube configuration as environment variables and using them in any job step (such as Maven, Ant, Gradle, ...);
* Using the Sonar Scanner job;
* Using SonarScanner for MSBuild's 'begin analysis' and 'end analysis' jobs;
'SonarQube Scanner' and 'SonarScanner for MSBuild' are managed as installable tools. List of available versions is retrieved
This file has been truncated. show original
I guess that the PR I referenced earlier is actually not ok.
net5.0 and net4.6 do both just show up under the same “id” in the JSON.
Would you guys agree on this? Should we just supply a PR for it and add a prefix (something like “net5”)?
pfeigl
(Philipp Feigl)
June 11, 2021, 6:39am
3
1 Like
Caba_Sagi
(Čaba Šagi)
August 2, 2021, 2:02pm
4
Hi @pfeigl
Did this PR solve your issue?
pfeigl
(Philipp Feigl)
August 2, 2021, 3:22pm
5
Yes my changes were merged and actually solved my problems.
All .NET Versions were available as expected in Jenkins later on.