Getting the following errors:
CompilerServer: server failed - server rejected the request due to analyzer / generator issues
- 'analyzer assembly ‘C:\Users\VssAdministrator\AppData\Local\Temp.sonarqube\resources\2\System.Buffers.dll’ has MVID ‘36e84b0d-9d74-4086-a062-54e1963f24d5’ but loaded assembly ‘System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ has MVID ‘f389ca43-32bf-4e24-ad8c-a6ed5efddff3’, analyzer assembly
- ‘C:\Users\VssAdministrator\AppData\Local\Temp.sonarqube\resources\2\System.Numerics.Vectors.dll’ has MVID ‘95de52ab-0179-450a-9f6f-08d224d60b15’ but loaded assembly ‘System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ has MVID ‘34905ed1-db9d-4250-b31b-b80e1ff70ff5’, analyzer assembly
- ‘C:\Users\VssAdministrator\AppData\Local\Temp.sonarqube\resources\2\System.Runtime.CompilerServices.Unsafe.dll’ has MVID ‘bd600ba8-23b5-4d45-ba63-f24457fa3be3’ but loaded assembly ‘System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ has MVID ‘9dde2c5e-b52a-4cbd-861e-9aacf36593ce’’ - b78f3f01-af23-4543-9b88-67f243cc757d
Versions used:
SonarScanner for MSBuild 5.3.1
.NET Core sdk 2.1
Azure DevOps pipeline
Potential workaround:
Using the same package versions as Sonar, as mentioned here.
This is not a valid workaround for me as I do not use these packages myself, I depend on another package that uses the packages mentioned in the error, as mentioned here.
Other solutions tried:
I tried referencing the conflicting packages in my project with the same version used by Sonar (found in the github project. Like this:
<PackageReference Include="System.Buffers" Version="4.5.1" PrivateAssets="All" NoWarn="NU1605"/>
The error still appears. Using different package versions also changes nothing in the error message, the MVID mentioned for the conflicting package stays the same.
Complete log:
CoreCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\csc.exe /noconfig /unsafe- /checked- /nowarn:1701,1702,1701,1702 /fullpaths /nostdlib+ /errorreport:prompt /warn:4 /define:TRACE;RELEASE;NETCOREAPP;NETCOREAPP2_1 /highentropyva+ / OMMITTED REFERENCES FOR READABILITY /debug- /debug:portable /filealign:512 /optimize+ /out:obj\Release\netcoreapp2.1\VensterTechniek.DAL.dll /ruleset:D:\a\1\.sonarqube\conf\Sonar-cs.ruleset /errorlog:D:\a\1\.sonarqube\out\10\Issues.json /target:library /warnaserror- /utf8output /deterministic+ /langversion:7.3 /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\0\Google.Protobuf.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\0\Newtonsoft.Json.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\0\SonarAnalyzer.CFG.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\0\SonarAnalyzer.CSharp.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\0\SonarAnalyzer.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\1\Google.Protobuf.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\1\SonarAnalyzer.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\1\SonarAnalyzer.VisualBasic.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\2\Microsoft.AspNetCore.Razor.Language.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\2\SonarAnalyzer.Security.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\2\System.Buffers.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\2\System.Memory.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\2\System.Numerics.Vectors.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\2\System.Runtime.CompilerServices.Unsafe.dll /analyzer:C:\Users\VssAdministrator\.nuget\packages\microsoft.entityframeworkcore.analyzers\2.1.4\analyzers\dotnet\cs\Microsoft.EntityFrameworkCore.Analyzers.dll /additionalfile:D:\a\1\.sonarqube\conf\cs\SonarLint.xml /additionalfile:D:\a\1\.sonarqube\conf\10\SonarProjectConfig.xml /additionalfile:D:\a\1\.sonarqube\conf\10\ProjectOutFolderPath.txt "obj\Release\netcoreapp2.1\.NETCoreApp,Version=v2.1.AssemblyAttributes.cs" obj\Release\netcoreapp2.1\VensterTechniek.DAL.AssemblyInfo.cs
CompilerServer: server failed - server rejected the request due to analyzer / generator issues 'analyzer assembly 'C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\2\System.Buffers.dll' has MVID '36e84b0d-9d74-4086-a062-54e1963f24d5' but loaded assembly 'System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' has MVID 'f389ca43-32bf-4e24-ad8c-a6ed5efddff3', analyzer assembly 'C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\2\System.Numerics.Vectors.dll' has MVID '95de52ab-0179-450a-9f6f-08d224d60b15' but loaded assembly 'System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has MVID '34905ed1-db9d-4250-b31b-b80e1ff70ff5', analyzer assembly 'C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\2\System.Runtime.CompilerServices.Unsafe.dll' has MVID 'bd600ba8-23b5-4d45-ba63-f24457fa3be3' but loaded assembly 'System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has MVID '9dde2c5e-b52a-4cbd-861e-9aacf36593ce'' - b78f3f01-af23-4543-9b88-67f243cc757d
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): Error :
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : [D:\a\1\s\VensterTechniek\VensterTechniek.DAL\VensterTechniek.DAL.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): Error : Process is terminated due to StackOverflowException.
Thanks,
Sander