CompilerServer: server failed - server rejected the request due to analyzer / generator issues 'analyzer assembly '/tmp/.sonarqube/resources/2/System.Runtime.CompilerServices.Unsafe.dll' has MVID 'bd600ba8-23b5-4d45-ba63-f24457fa3be3' but loaded assembly 'System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has MVID '7c39e25e-0207-4f4b-aedc-1c131c046167', analyzer assembly '/tmp/.sonarqube/resources/2/System.Memory.dll' has MVID 'a5006ea2-ea34-4a8e-8c71-a2eb982aadc0' but loaded assembly 'System.Memory, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' has MVID 'bd34e6d8-6e57-4fa4-afbf-ec5404de38cf'' - 9178c913-469b-4ae3-8c3b-a7ba03c9042b
what is the version of SonarQube that you are using?
what version of MSBuild are you using?
And we’ll need the logs:
please give us the verbose output of the scanner commands (sonar.verbose=true extra parameter for the first step, and please attach the output of the first and last analysis step)
please give the output of running MSBuild in verbose mode (/v:d)
As you can see, multiple resource directories. One of the directories is also mentioned in the error message.
CompilerServer: server failed - server rejected the request due to analyzer / generator issues 'analyzer assembly '/tmp/.sonarqube/resources/2/System.Runtime.CompilerServices.Unsafe.dll' has MVID 'bd600ba8-23b5-4d45-ba63-f24457fa3be3' but loaded assembly 'System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has MVID '7c39e25e-0207-4f4b-aedc-1c131c046167', analyzer assembly '/tmp/.sonarqube/resources/2/System.Memory.dll' has MVID 'a5006ea2-ea34-4a8e-8c71-a2eb982aadc0' but loaded assembly 'System.Memory, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' has MVID 'bd34e6d8-6e57-4fa4-afbf-ec5404de38cf'' - e953d8f2-6f37-447f-9322-7386f27ac595
We have the same issue using dotnet-sonarscanner and with SonarScanner for MSBuild (5.2). But there are much more of those errors with dotnet-sonarscanner (around 300 vs around 30 with SonarScanner for MSBuild for the same PR).
Hi @Andrei_Epure,
To add to my post above, our analysis does not fail, but I wonder if there is any impact on the analysis? Do you know if we might miss analysis for some code because of that?
Messages like this are spammed very often during this build. Strangely, also the build times are exploding on this build. There are 2 compile steps in the build, that usually take roughly 1 minute and a few seconds. With SonarQube enabled they take more than 21 and 26 minutes, exceeding the build time limit (its a build per commit situation so an hour build time is not acceptable) causing it to fail.
We are talking about a DevOps project (self hosted agent) with 2 .NET solutions being built in that build, using the SonarQube DevOps Pipeline Plugin.