Azure DevOps Extension (v3) failing (System.IO.FileLoadException)

Our Azure DevOps plugin was just updated automatically to v3 about 30 minutes ago. Now, our scans are failing:


##[error]Unhandled Exception:
##[error]System.IO.FileLoadException: Could not load file or assembly 'SonarScanner.MSBuild.PreProcessor, Version=6.2.0.0, Culture=neutral, PublicKeyToken=c5b62af9de6d7244' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

16 Likes

We see the same on premise with SonarQube Azure DevOps Extension 7.0.0 updated 38 minutes ago

Task         : Prepare Analysis Configuration
Description  : Prepare SonarQube analysis configuration
Version      : 6.3.3
Author       : sonarsource
Help         : [More Information](https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/scanners/sonarqube-extension-for-azure-devops/)
==============================================================================
D:\_1\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\6.3.3\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe begin /k:UnitedGrinding.EcoPageViewer
SonarScanner for MSBuild 6.2
Using the .NET Framework version of the Scanner for MSBuild
Pre-processing started.
##[error]Unhandled Exception:

##[error]System.IO.FileLoadException: Could not load file or assembly 'SonarScanner.MSBuild.PreProcessor, Version=6.2.0.0, Culture=neutral, PublicKeyToken=c5b62af9de6d7244' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   at SonarScanner.MSBuild.BootstrapperClass.<PreProcess>d__9.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at SonarScanner.MSBuild.BootstrapperClass.PreProcess()
2 Likes

We also see this problem with SonarQubePrepare@6. Also SonarQubePrepare@7 gives the same error.

It broke after this change (around a hour ago):

1 Like

SonarCloudPrepare@2 gives the same result.

1 Like

Hi

Same here
I was using the sonar task 6.3.2 for Azure Devops, with no issue until my build has automatically downloaded the v 6.3.3, having now the issue mentionned previously.

Blockquote
System.IO.FileLoadException: Could not load file or assembly 'SonarScanner.MSBuild.PreProcessor, Version=6.2.0.0,

I have upgraded the Sonar tasks to version v7.0.0 : same error mentionning it’s looking for
the assembly 'SonarScanner.MSBuild.PreProcessor, Version=6.2.0.0 !

This is obviously a regression, this regression is persisting in our cache or something else.

Could you help ?

1 Like

We are facing the same issue, all pipelines failing with the extension 7.0.0

1 Like

Same issue here

1 Like

I have the same issue.
As a temporary solution you can always use this dirty trick:
Copy previous task folder on your agent from previous version e.g “6.3.2” and rename it to latest version “6.3.3”.
Ensure to do this for all sonarqube related tasks like prepare, analyze, report …


I hope this is helpful!

1 Like

Same error using 6.3.3

MEsmo erro com 6.3.3
##[error]Unhandled Exception:
##[error]System.IO.FileLoadException: Could not load file or assembly 'SonarScanner.MSBuild.PostProcessor, Version=6.2.0.0, Culture=neutral, or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Same issue here.

Temp fix if you use Azure Devops YAML pipelines. Asign a hardcoded version to your task:
- task: SonarCloudPrepare@2.3.2

3 Likes

We’re running into the same issue.

Downgrading to SonarCloudPrepare@1 seems to be working as a temporary solution.

SonarQubePrepare@6.3.2 seems to work for me

(so 6.3.2 is fine, 6.3.3 and 7.0.0 are broken)

4 Likes

Same here even on latest version, I had to downgrade to SonarQubePrepare@5 to work properly

use SonarQubePrepare@5 . It works fine for me after extension updated to 7.0.0 an hour ago.

1 Like

I’m using SonarQubePrepare@6 and I’m facing the same issue. Any updates?

Facing same issue , after extension’s version has been upgraded to 7.0.0. Hoping to see the fix released soon :slightly_smiling_face:

Use SonarQubePrepare@6.3.2 instead of SonarQubePrepare@6 as work around

6 Likes

Hi all,

Welcome to the community, those who are new, and thanks for these reports!

We’re currently spinning up incident management for this, and we’ll get right on a fix. I’ll update here when we have more to tell you.

 
Ann & the .NET team

3 Likes

Works just fine for me, thanks.

1 Like