Must-share information (formatted with Markdown):
SonarQube
how is SonarQube deployed: AWS enterprise
what are you trying to achieve: code scan
what have you tried so far to achieve this: issue looks to be in msbuild rebuild - we’ve tried dotnet scanner .net version 6.1 + 5.15 and both have same error
When
SonarScanner.MSBuild.exe begin
and
MSBuild.exe Rebuild
Error only occurs on two projects out of 50+
.nuget\packages\microsoft.net.compilers\2.1.0\tools\Microsoft.CSharp.Core.targets(71,5): error MSB60
06: “csc.exe” exited with code 1.
All projects using same .NET version and compiler etc
Normal MSBuild 16.11 compiles whole solution with no issue
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!
To be clear, are you saying that you get a compile error when you’ve run the begin command before compile - and only then? Running an independent compile works fine?
And can you provide full, debug logs?
Share the Scanner for .NET verbose logs
Add /d:"sonar.verbose=true" to the…
SonarScanner.MSBuild.exe or dotnet sonarscannerbegin command to get more detailed logs
For example: SonarScanner.MSBuild.exe begin /k:"MyProject" /d:"sonar.verbose=true"
“SonarQubePrepare” or “SonarCloudPrepare” task’s extraProperties argument if you are using Azure DevOps