Closed
Description
Issue Description
Throwing and catching exceptions has perf implications and generally makes debugging harder.
Steps to Reproduce
Run msbuild /ll
under a debugger.
Expected Behavior
No exceptions.
Actual Behavior
Many occurrences of:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Build.Logging.LiveLogger.ProjectNode.Log() in C:\src\msbuild\src\MSBuild\LiveLogger\ProjectNode.cs:line 156
With an occasional:
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
at Microsoft.Build.Logging.LiveLogger.TerminalBuffer.Render() in C:\src\msbuild\src\MSBuild\LiveLogger\TerminalBuffer.cs:line 145
Analysis
No response
Versions & Configurations
Commit dfd8f41