# Upgrading SonarScanner to 5.X will fail our Azure DevOps builds

**URL:** <https://community.sonarsource.com/t/upgrading-sonarscanner-to-5-x-will-fail-our-azure-devops-builds/34086>\
**Category:** SonarQube Server / Community Build\
**Tags:** azuredevops-services\
**Created:** [November 6, 2020, 11:39am UTC](https://community.sonarsource.com/t/upgrading-sonarscanner-to-5-x-will-fail-our-azure-devops-builds/34086 "2020-11-06T11:39:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Duracell1989](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/duracell1989/32/63877_2.png) [@Duracell1989](https://community.sonarsource.com/u/Duracell1989)\
**Post date:** [November 6, 2020, 11:39am UTC](https://community.sonarsource.com/t/upgrading-sonarscanner-to-5-x-will-fail-our-azure-devops-builds/34086/1 "2020-11-06T11:39:17Z")

</div>

Our Azure DevOps builds fail after the commits which upgrade the SonarScanner to 5.X

See:

 ![Failing builds](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/5/7/571c8a189649377556efd82edcfb0771dd5d67c6.png)

After the update of the red lines; our builds started failing. After the black updates, our builds starting working again.

Version:  
SonarQube: \* Version 7.1 (build 11001) [Community]  
SonarQube Azure DevOps extension: Always the latest (4.14.0 (Latest))

---

<div class="post-metadata">

**Author:** ![Duracell1989](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/duracell1989/32/63877_2.png) [@Duracell1989](https://community.sonarsource.com/u/Duracell1989)\
**Post date:** [November 6, 2020, 12:03pm UTC](https://community.sonarsource.com/t/upgrading-sonarscanner-to-5-x-will-fail-our-azure-devops-builds/34086/2 "2020-11-06T12:03:42Z")

</div>

Some more information; this is the error we see:

```
Starting: Prepare analysis on SonarQube
==============================================================================
Task : Prepare Analysis Configuration
Description : Prepare SonarQube analysis configuration
Version : 4.14.0
Author : sonarsource
Help : Version: 4.14.0. [More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
==============================================================================
<snip>\4.14.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe begin /k:<snip>
SonarScanner for MSBuild 5.0.2
Using the .NET Framework version of the Scanner for MSBuild
Pre-processing started.
Preparing working directories...
11:03:10.444 Updating build integration targets...
11:03:15.17 11:03:15.17 WARNING: Failed to fetch license status from server.
##[error]11:03:15.17 Your SonarQube instance seems to have an invalid license. Please check it. Server url : <snip>
11:03:15.17 Pre-processing failed. Exit code: 1
11:03:15.17 Your SonarQube instance seems to have an invalid license. Please check it. Server url : <snip>
11:03:15.17 Pre-processing failed. Exit code: 1
##[error]The process '<snip>\4.14.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe' failed with exit code 1
Finishing: Prepare analysis on SonarQube
```

---

<div class="post-metadata">

**Author:** ![mickaelcaro](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mickaelcaro/32/4147_2.png) [@mickaelcaro](https://community.sonarsource.com/u/mickaelcaro)\
**Post date:** [November 6, 2020, 1:41pm UTC](https://community.sonarsource.com/t/upgrading-sonarscanner-to-5-x-will-fail-our-azure-devops-builds/34086/3 "2020-11-06T13:41:47Z")

</div>

Hi @Duracell1989

This should be fixed with version 4.15 of the extension.

Sorry for the inconvenience.

Mickaël

---

<div class="post-metadata">

**Author:** ![kjartan](https://avatars.discourse-cdn.com/v4/letter/k/7ea924/32.png) [@kjartan](https://community.sonarsource.com/u/kjartan)\
**Post date:** [November 6, 2020, 1:56pm UTC](https://community.sonarsource.com/t/upgrading-sonarscanner-to-5-x-will-fail-our-azure-devops-builds/34086/4 "2020-11-06T13:56:49Z")

</div>

I can see the new version on my Azure DevOps instance,

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/b/6/b67de3ddfa35cc92eef687134bd004cc0c33a82a.png)  
However after manually removing the task from our build agents they still download the 4.14 version of the task  
 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/e/5/e506e93b57ba2ed9e49f8ab9efa436c1516cb68e.png)  
 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/6/3/637a82d1897f6bd245d49f81c4449d149ada6b19.png)

\*\*\* Update \*\*\*  
This has updated on my build agents now 🙂 and I’m not seeing the problem anymore

---

<div class="post-metadata">

**Author:** ![Duracell1989](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/duracell1989/32/63877_2.png) [@Duracell1989](https://community.sonarsource.com/u/Duracell1989)\
**Post date:** [November 6, 2020, 2:18pm UTC](https://community.sonarsource.com/t/upgrading-sonarscanner-to-5-x-will-fail-our-azure-devops-builds/34086/5 "2020-11-06T14:18:20Z")

</div>

Yes, I saw that a new commit has been done to revert the changes. Maybe don’t ‘test’ these upgrades on the main branch because it get’s automatically updated for everyone who is using this extension.  
And I didn’t see any option to disable the automatic update of extensions in Azure DevOps; so, please be a bit more careful when merging to the main branch; because it hits a lot of people 🙂

---

<div class="post-metadata">

**Author:** ![mickaelcaro](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mickaelcaro/32/4147_2.png) [@mickaelcaro](https://community.sonarsource.com/u/mickaelcaro)\
**Post date:** [November 6, 2020, 2:32pm UTC](https://community.sonarsource.com/t/upgrading-sonarscanner-to-5-x-will-fail-our-azure-devops-builds/34086/6 "2020-11-06T14:32:34Z")

</div>

> [@Duracell1989](#):
>
> so, please be a bit more careful when merging to the main branch; because it hits a lot of people

I know, and bare with me, no one wants bug in production 😉  
Sorry for the incovenience.

---

<div class="post-metadata">

**Author:** ![Duracell1989](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/duracell1989/32/63877_2.png) [@Duracell1989](https://community.sonarsource.com/u/Duracell1989)\
**Post date:** [November 9, 2020, 2:02pm UTC](https://community.sonarsource.com/t/upgrading-sonarscanner-to-5-x-will-fail-our-azure-devops-builds/34086/7 "2020-11-09T14:02:48Z")

</div>

@mickaelcaro; Do I need to create an issue on: [https://github.com/SonarSource/sonar-scanner-msbuild](https://github.com/SonarSource/sonar-scanner-msbuild) ?  
Because, also using the SonarQube Scanner for MSBuild (5.x) manually gives the same error. Thus, the error isn’t in the VSTS/Azure DevOps extension, but it fails due to the underlying package.

---

<div class="post-metadata">

**Author:** ![mickaelcaro](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mickaelcaro/32/4147_2.png) [@mickaelcaro](https://community.sonarsource.com/u/mickaelcaro)\
**Post date:** [November 9, 2020, 3:28pm UTC](https://community.sonarsource.com/t/upgrading-sonarscanner-to-5-x-will-fail-our-azure-devops-builds/34086/8 "2020-11-09T15:28:58Z")

</div>

Hi @Duracell1989

There’s already an issue (which has been reopened recently) for that ( [https://github.com/SonarSource/sonar-scanner-msbuild/issues/917](https://github.com/SonarSource/sonar-scanner-msbuild/issues/917))

Mickaël

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [November 16, 2020, 3:29pm UTC](https://community.sonarsource.com/t/upgrading-sonarscanner-to-5-x-will-fail-our-azure-devops-builds/34086/9 "2020-11-16T15:29:02Z")

</div>

Closed on November 16, 2020, 3:29pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
