' Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.InvalidCastException: Unable to cast object of type 'Microsoft.CodeAnalysis.VisualBasic.Syntax.CompilationUnitSyntax' to type 'Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode'. at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker.Visit(SyntaxNode node) at Microsoft.DotNet.CodeFormatting.Rules.MarkReadonlyFieldsRule.WritableFieldScanner.d__5.MoveNext() in E:\Repos\codeformatter\src\Microsoft.DotNet.CodeFormatting\Rules\MarkReadonlyFieldsRule.cs:line 120 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at Microsoft.DotNet.CodeFormatting.Rules.MarkReadonlyFieldsRule.d__5.MoveNext() in E:\Repos\codeformatter\src\Microsoft.DotNet.CodeFormatting\Rules\MarkReadonlyFieldsRule.cs:line 52 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at Microsoft.DotNet.CodeFormatting.FormattingEngineImplementation.d__66.MoveNext() in E:\Repos\codeformatter\src\Microsoft.DotNet.CodeFormatting\FormattingEngineImplementation.cs:line 492 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at Microsoft.DotNet.CodeFormatting.FormattingEngineImplementation.d__65.MoveNext() in E:\Repos\codeformatter\src\Microsoft.DotNet.CodeFormatting\FormattingEngineImplementation.cs:line 469 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at Microsoft.DotNet.CodeFormatting.FormattingEngineImplementation.d__54.MoveNext() in E:\Repos\codeformatter\src\Microsoft.DotNet.CodeFormatting\FormattingEngineImplementation.cs:line 297 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at Microsoft.DotNet.CodeFormatting.FormattingEngineImplementation.d__51.MoveNext() in E:\Repos\codeformatter\src\Microsoft.DotNet.CodeFormatting\FormattingEngineImplementation.cs:line 237 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() at Microsoft.DotNet.CodeFormatting.FormattingEngineImplementation.d__46.MoveNext() in E:\Repos\codeformatter\src\Microsoft.DotNet.CodeFormatting\FormattingEngineImplementation.cs:line 172 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() at Microsoft.DotNet.CodeFormatting.FormattingEngineImplementation.d__44.MoveNext() in E:\Repos\codeformatter\src\Microsoft.DotNet.CodeFormatting\FormattingEngineImplementation.cs:line 153 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at CodeFormatter.Program.d__8.MoveNext() in E:\Repos\codeformatter\src\CodeFormatter\Program.cs:line 178 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at CodeFormatter.Program.d__7.MoveNext() in E:\Repos\codeformatter\src\CodeFormatter\Program.cs:line 149 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait(CancellationToken cancellationToken) at CodeFormatter.Program.RunFormatCommand(FormatOptions options) in E:\Repos\codeformatter\src\CodeFormatter\Program.cs:line 110 at CodeFormatter.Program.<>c.
b__2_2(FormatOptions formatOptions) in E:\Repos\codeformatter\src\CodeFormatter\Program.cs:line 37 at CommandLine.ParserResultExtensions.MapResult[T1,T2,T3,TResult](ParserResult`1 result, Func`2 parsedFunc1, Func`2 parsedFunc2, Func`2 parsedFunc3, Func`2 notParsedFunc) at CodeFormatter.Program.Main(String[] args) in E:\Repos\codeformatter\src\CodeFormatter\Program.cs:line 30 Test-CommandSuccess : CodeFormatter failed: error code -532462766 At C:\user\tasks\workitems\codeformatting_26ac472b-6b9b-4ea0-aa90-b9fb6b9e280b\ job-1\codeformatting\wd\Run-CodeFormatter.ps1:187 char:1 + Test-CommandSuccess "CodeFormatter" $LASTEXITCODE + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorExcep tion + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio n,Test-CommandSuccess