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)
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()
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.
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 …
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)