Fix TerminalLogger crash when ProjectStarted arrives without prior evaluation event #13096
+36
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NodeLoggingContext.LogProjectStarted(request, configuration)setsevaluationId = InvalidEvaluationIdwhenconfiguration.IsCachedis true orconfiguration.Projectis nullBuildRequestConfigurationdoesn't storeEvaluationIdseparately - only gets it fromProjectInstanceProjectInstancemay not be available, causingInvalidEvaluationIdto be usedEvaluationIdinBuildRequestConfigurationso it survives cachingOriginal prompt
This section details on the original issue you should resolve
<issue_title>Multithreaded build for roslyn crashes in TerminalLogger</issue_title>
<issue_description>### Issue Description
After resolving issue with WPF build, the Roslyn build still crashes
Steps to Reproduce
use a patched MSBuild with #12991
Expected Behavior
builds roslyn correctly
(this works with TL disabled)
Actual Behavior
PS C:\Users\janprovaznik\dev\testing\roslyn> ....\msbuilds\msb1\artifacts\bin\bootstrap\core\dotnet.exe build .\Roslyn.slnx /mt /bl
Restore complete (31.4s)
RulesetToEditorconfigConverter net472 win-x86 succeeded (22.6s) → artifacts\bin\RulesetToEditorconfigConverter\Debug\net472\RulesetToEditorconfigConverter.exe
GenerateAnalyzerNuspec net10.0 succeeded (22.7s) → artifacts\bin\GenerateAnalyzerNuspec\Debug\net10.0\GenerateAnalyzerNuspec.dll
TestReferenceAssembly netstandard2.0 succeeded (4.8s) → artifacts\bin\TestReferenceAssembly\Debug\netstandard2.0\TestReferenceAssembly.dll
CSharpSyntaxGenerator netstandard2.0 succeeded (17.5s) → artifacts\bin\CSharpSyntaxGenerator\Debug\netstandard2.0\CSharpSyntaxGenerator.dll
Microsoft.Build.Tasks.CodeAnalysis.Sdk net472 succeeded (20.1s) → artifacts\bin\Microsoft.Build.Tasks.CodeAnalysis.Sdk\Debug\net472\Microsoft.Build.Tasks.CodeAnalysis.Sdk.dll
Metrics net472 win-x86 succeeded (37.6s) → artifacts\bin\Metrics\Debug\net472\Metrics.exe
Microsoft.CodeAnalysis.PublicApiAnalyzers netstandard2.0 succeeded (39.9s) → artifacts\bin\Microsoft.CodeAnalysis.PublicApiAnalyzers\Debug\netstandard2.0\Microsoft.CodeAnalysis.PublicApiAnalyzers.dll
Microsoft.CodeAnalysis.Analyzers netstandard2.0 succeeded (44.7s) → artifacts\bin\Microsoft.CodeAnalysis.Analyzers\Debug\netstandard2.0\Microsoft.CodeAnalysis.Analyzers.dll
Microsoft.CodeAnalysis.ResxSourceGenerator netstandard2.0 succeeded (40.2s) → artifacts\bin\Microsoft.CodeAnalysis.ResxSourceGenerator\Debug\netstandard2.0\Microsoft.CodeAnalysis.ResxSourceGenerator.dll
Microsoft.CodeAnalysis.BannedApiAnalyzers netstandard2.0 succeeded (45.0s) → artifacts\bin\Microsoft.CodeAnalysis.BannedApiAnalyzers\Debug\netstandard2.0\Microsoft.CodeAnalysis.BannedApiAnalyzers.dll
Microsoft.CodeAnalysis.AnalyzerUtilities netstandard2.0 succeeded (38.8s) → artifacts\bin\Microsoft.CodeAnalysis.AnalyzerUtilities\Debug\netstandard2.0\Microsoft.CodeAnalysis.AnalyzerUtilities.dll
Roslyn.Diagnostics.Analyzers netstandard2.0 succeeded (42.0s) → artifacts\bin\Roslyn.Diagnostics.Analyzers\Debug\netstandard2.0\Roslyn.Diagnostics.Analyzers.dll
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers netstandard2.0 succeeded (41.6s) → artifacts\bin\Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers\Debug\netstandard2.0\Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers.dll
Text.Analyzers netstandard2.0 succeeded (43.3s) → artifacts\bin\Text.Analyzers\Debug\netstandard2.0\Text.Analyzers.dll
Microsoft.Build.Tasks.CodeAnalysis net472 succeeded (20.2s) → artifacts\bin\Microsoft.Build.Tasks.CodeAnalysis\Debug\net472\Microsoft.Build.Tasks.CodeAnalysis.dll
Microsoft.CodeAnalysis.Debugging.Package netstandard2.0 succeeded (7.1s) → artifacts\bin\Microsoft.CodeAnalysis.Debugging.Package\Debug\netstandard2.0\Microsoft.CodeAnalysis.Debugging.Package.dll
Microsoft.CodeAnalysis.PooledObjects.Package netstandard2.0 succeeded (7.2s) → artifacts\bin\Microsoft.CodeAnalysis.PooledObjects.Package\Debug\netstandard2.0\Microsoft.CodeAnalysis.PooledObjects.Package.dll
Microsoft.CodeAnalysis.CSharp.BannedApiAnalyzers netstandard2.0 succeeded (9.8s) → artifacts\bin\Microsoft.CodeAnalysis.CSharp.BannedApiAnalyzers\Debug\netstandard2.0\Microsoft.CodeAnalysis.CSharp.BannedApiAnalyzers.dll
Microsoft.CodeAnalysis netstandard2.0 succeeded (40.3s) → artifacts\bin\Microsoft.CodeAnalysis\Debug\netstandard2.0\Microsoft.CodeAnalysis.dll
GenerateDocumentationAndConfigFiles net10.0 succeeded (52.0s) → artifacts\bin\GenerateDocumentationAndConfigFiles\Debug\net10.0\GenerateDocumentationAndConfigFiles.dll
Microsoft.CodeAnalysis.Contracts.Package net8.0 succeeded (9.0s) → artifacts\bin\Microsoft.CodeAnalysis.Contracts.Package\Debug\net8.0\Microsoft.CodeAnalysis.Contracts.Package.dll
Microsoft.CodeAnalysis.ResxSourceGenerator.VisualBasic netstandard2.0 succeeded (9.4s) → artifacts\bin\Microsoft.CodeAnalysis.ResxSourceGenerator.VisualBasic\Debug\netstandard2.0\Microsoft.CodeAnalysis.ResxSourceGenerator.VisualBasic.dll
Microsoft.CodeAnalysis.Collections.Package net10.0 succeeded (10.4s) → artifacts\bin\Microsoft.CodeAnalysis.Collections.Package\Debug\net10.0\Microsoft.CodeAnalysis.Collections.Package.dll
Microsoft.CodeAnalysis.ResxSourceGenerator.CSharp netstandard2.0 succeeded (10.8s) → artifacts\bin\Microsoft.CodeAnalysis.ResxSourceGenerator.CSharp\Debug\netstandard2.0\Microsoft.CodeAnalysis.ResxSourceGenerator.CSharp.dl...
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.