Bug: No overload for method 'this' takes 2 arguments

Getting an error message when opening our patch in the latest Version (2021.4.2):

System.AggregateException: One or more errors occurred. ---> VL.Lang.Platforms.Roslyn.EmitException: C:\Users\seltz\Desktop\SpaceMusic\SpaceMusic\SpaceMusic_UI.vl.cs(11584,25): error CS1501: No overload for method 'this' takes 2 arguments
   at VL.Lang.Platforms.Roslyn.TargetCompilation.<>c__DisplayClass45_0.<Emit>g__EmitRelease|1()
   at VL.Lang.Platforms.Roslyn.TargetCompilation.Emit(IProjectSymbol project, CSharpCompilation compilation, Boolean isDebug, Boolean includeSource, CancellationToken token)
   at VL.Lang.Platforms.Roslyn.TargetCompilation.<>c__DisplayClass2_0.<InitializeAsync>g__Build|2(ProjectBuildRequest projectBuildRequest)
   at VL.Lang.Platforms.Roslyn.TargetCompilation.<>c__DisplayClass2_0.<InitializeAsync>g__BuildOrLoad|1(ProjectBuildRequest buildRequest)
   at VL.Lang.Platforms.Roslyn.TargetCompilation.<>c__DisplayClass2_1.<<InitializeAsync>b__5>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at VL.Lang.Platforms.Roslyn.TargetCompilation.<InitializeAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at VL.Lang.Platforms.Roslyn.TargetCompilation.<CreateAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at VL.Lang.Platforms.Roslyn.TargetCompilation.<WithCompilationAsync>d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at VL.Lang.Platforms.Roslyn.TargetCompilation.<VL-Lang-Symbols-ITargetCompilation-WithCompilationAsync>d__42.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at VL.Model.VLSession.<CreateTargetCompilationAsync>d__168.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at VL.Model.VLSession.<UpdateRuntimesAsync>d__167.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at VL.Model.VLSession.<UpdateCompilationAsync>d__187.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at VL.Model.VLSession.<UpdateCompilationAsync>d__187.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at VL.Model.VLSession.<UpdateCompilationAsync>d__184.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at VL.Model.VLSession.<UpdateAsync>d__180.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at VL.HDE.PatchEditor.NavigationMenuProvider.<DoOpenDocumentsAsync>d__47.MoveNext()
   --- End of inner exception stack trace ---
   at VL.HDE.PatchEditor.NavigationMenuProvider.<DoOpenDocumentsAsync>d__47.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at VL.Model.VLSession.<>c__DisplayClass181_0.<<RunAndForget>b__0>d.MoveNext()

Opening it in an earlier version does not cause this bug. The error is shown during loading of the file.

Do you know the last version in which it worked? But in any case, I fear you’ll have to send us the patch/project to get at the bottom of this.

I was able to find the util operation that has this error, it seems to be an accumulator of type Dictionary.Builder if this accumulator is replaced by a Dictionary, it compiles:
Method args bug.vl (16.9 KB)

Thanks, that helped! Added the patch to our unit tests.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.