Description
For some time period of time (I don't remember exactly, but it's been months) I've been getting intermittent failures in the C# compiler in CodeQL analysis legs in GitHub Actions workflows.
Seemingly at random, the code will fail to compile with an error like this:
Running /home/runner/work/Polly/Polly/.dotnet/dotnet build --no-incremental /home/runner/work/Polly/Polly/Polly.sln
MSBuild version 17.7.3+8ec440e68 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
Polly.Core -> /home/runner/work/Polly/Polly/src/Polly.Core/bin/Debug/net6.0/Polly.Core.dll
Polly.Core -> /home/runner/work/Polly/Polly/src/Polly.Core/bin/Debug/net462/Polly.Core.dll
/home/runner/work/Polly/Polly/.dotnet/sdk/7.0.402/Roslyn/Microsoft.CSharp.Core.targets(80,5): error MSB6006: "csc.dll" exited with code 1. [/home/runner/work/Polly/Polly/src/Polly/Polly.csproj::TargetFramework=net6.0]
This only affects compilation for CodeQL so I imagine that something there is part of the problem, however I've attempted to get more information out of the build using approaches like --verbosity diagnostic
and /p:ErrorLog=./msbuild.log
(e.g. martincostello/alexa-london-travel-site#1910), but to no avail. I don't seem to be able to get any further detail out of the compiler as to why it is failing.
In this case today, it failed 5 times in a row.
Maybe this is related to #42616 and some custom analysis for CodeQL is the root cause, but unless I'm incorrectly configuring something, the C# compiler should emit some more detailed information about what is wrong to aid resolution of the problem.
Version Used:
At least the following versions of the .NET SDK have manifested this issue:
- 7.0.400
- 7.0.401
- 7.0.402
Steps to Reproduce:
Run either of these two workflows in GitHub Actions to perform CodeQL code analysis:
- .github/workflows/codeql-analysis.yml in App-vNext/Polly
- .github/workflows/codeql-analysis.yml in martincostello/alexa-london-travel-site
Diagnostic Id:
MSB6006
Expected Behavior:
The code compiles.
Actual Behavior:
Errors such as the below occur:
/home/runner/work/Polly/Polly/.dotnet/sdk/7.0.402/Roslyn/Microsoft.CSharp.Core.targets(80,5): error MSB6006: "csc.dll" exited with code 1. [/home/runner/work/Polly/Polly/src/Polly/Polly.csproj::TargetFramework=net6.0]