roslyn
roslyn copied to clipboard
MethodNotFoundException when running RoslynDeployment on main
Found the following in C:\Users\PC\AppData\Roaming\Microsoft\VisualStudio\17.0_67a26174RoslynDev\ActivityLog.xml
SetSite failed for package [Roslyn Diagnostics Window]Source: 'Roslyn.VisualStudio.DiagnosticsWindow' Description: Method not found: 'System.Threading.Tasks.Task`1<Microsoft.CodeAnalysis.Remote.RemoteHostClient> Microsoft.CodeAnalysis.Remote.RemoteHostClient.TryGetClientAsync(Microsoft.CodeAnalysis.Host.HostWorkspaceServices, System.Threading.CancellationToken)'. System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<Microsoft.CodeAnalysis.Remote.RemoteHostClient> Microsoft.CodeAnalysis.Remote.RemoteHostClient.TryGetClientAsync(Microsoft.CodeAnalysis.Host.HostWorkspaceServices, System.Threading.CancellationToken)'. at Roslyn.VisualStudio.DiagnosticsWindow.OptionsPages.PerformanceLoggersPage.<>c__DisplayClass5_0.<SetLoggers>b__3() at Microsoft.VisualStudio.Threading.JoinableTaskFactory.ExecuteJob[T](Func`1 asyncMethod, JoinableTask job) --- 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 Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread() at Microsoft.VisualStudio.Threading.JoinableTask`1.CompleteOnCurrentThread() at Roslyn.VisualStudio.DiagnosticsWindow.OptionsPages.PerformanceLoggersPage.SetLoggers(IGlobalOptionService globalOptions, IThreadingContext threadingContext, HostWorkspaceServices workspaceServices) in C:\Users\PC\Desktop\Roslyn\src\VisualStudio\VisualStudioDiagnosticsToolWindow\OptionPages\PerformanceLoggersPage.cs:line 68 at Roslyn.VisualStudio.DiagnosticsWindow.VisualStudioDiagnosticsWindowPackage.<InitializeAsync>d__3.MoveNext() in C:\Users\PC\Desktop\Roslyn\src\VisualStudio\VisualStudioDiagnosticsToolWindow\VisualStudioDiagnosticsWindowPackage.cs:line 96 --- 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 Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass20_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e) at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck) at Microsoft.VisualStudio.Services.VsTask.GetResult()
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Looks like something we're missing an ea layer for. This constructor can be added back if needed and can forward to the new method
DiagnosticWindow is built from Roslyn.sln. @Youssef1313 did you try to rebuild and reinstall the VSIX?
@tmat I'm still able to reproduce:
<entry>
<record>3779</record>
<time>2022/08/11 13:03:59.622</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [Roslyn Diagnostics Window]</description>
<guid>{49E24138-9EE3-49E0-8EDE-6B39F49303BF}</guid>
</entry>
<entry>
<record>3780</record>
<time>2022/08/11 13:03:59.764</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Roslyn Diagnostics Window]Source: 'Roslyn.VisualStudio.DiagnosticsWindow' Description: Method not found: 'System.Threading.Tasks.Task`1<Microsoft.CodeAnalysis.Remote.RemoteHostClient> Microsoft.CodeAnalysis.Remote.RemoteHostClient.TryGetClientAsync(Microsoft.CodeAnalysis.Host.HostWorkspaceServices, System.Threading.CancellationToken)'.
System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<Microsoft.CodeAnalysis.Remote.RemoteHostClient> Microsoft.CodeAnalysis.Remote.RemoteHostClient.TryGetClientAsync(Microsoft.CodeAnalysis.Host.HostWorkspaceServices, System.Threading.CancellationToken)'.
 at Roslyn.VisualStudio.DiagnosticsWindow.OptionsPages.PerformanceLoggersPage.<>c__DisplayClass5_0.<SetLoggers>b__3()
 at Microsoft.VisualStudio.Threading.JoinableTaskFactory.ExecuteJob[T](Func`1 asyncMethod, JoinableTask job)
--- 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 Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
 at Microsoft.VisualStudio.Threading.JoinableTask`1.CompleteOnCurrentThread()
 at Roslyn.VisualStudio.DiagnosticsWindow.OptionsPages.PerformanceLoggersPage.SetLoggers(IGlobalOptionService globalOptions, IThreadingContext threadingContext, HostWorkspaceServices workspaceServices) in C:\Users\PC\Desktop\Roslyn\src\VisualStudio\VisualStudioDiagnosticsToolWindow\OptionPages\PerformanceLoggersPage.cs:line 68
 at Roslyn.VisualStudio.DiagnosticsWindow.VisualStudioDiagnosticsWindowPackage.<InitializeAsync>d__3.MoveNext() in C:\Users\PC\Desktop\Roslyn\src\VisualStudio\VisualStudioDiagnosticsToolWindow\VisualStudioDiagnosticsWindowPackage.cs:line 96
--- 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 Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass20_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)
 at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)
 at Microsoft.VisualStudio.Services.VsTask.GetResult()</description>
<guid>{49E24138-9EE3-49E0-8EDE-6B39F49303BF}</guid>
<hr>80131513</hr>
</entry>
This no longer reproduces on my side. Closing.