roslyn icon indicating copy to clipboard operation
roslyn copied to clipboard

MethodNotFoundException when running RoslynDeployment on main

Open Youssef1313 opened this issue 1 year ago • 4 comments

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()	

Youssef1313 avatar Aug 08 '22 07:08 Youssef1313

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

CyrusNajmabadi avatar Aug 08 '22 18:08 CyrusNajmabadi

DiagnosticWindow is built from Roslyn.sln. @Youssef1313 did you try to rebuild and reinstall the VSIX?

tmat avatar Aug 08 '22 18:08 tmat

@tmat I'm still able to reproduce:

image

  <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: &apos;Roslyn.VisualStudio.DiagnosticsWindow&apos; Description: Method not found: &apos;System.Threading.Tasks.Task`1&lt;Microsoft.CodeAnalysis.Remote.RemoteHostClient&gt; Microsoft.CodeAnalysis.Remote.RemoteHostClient.TryGetClientAsync(Microsoft.CodeAnalysis.Host.HostWorkspaceServices, System.Threading.CancellationToken)&apos;.&#x000D;&#x000A;System.MissingMethodException: Method not found: &apos;System.Threading.Tasks.Task`1&lt;Microsoft.CodeAnalysis.Remote.RemoteHostClient&gt; Microsoft.CodeAnalysis.Remote.RemoteHostClient.TryGetClientAsync(Microsoft.CodeAnalysis.Host.HostWorkspaceServices, System.Threading.CancellationToken)&apos;.&#x000D;&#x000A;   at Roslyn.VisualStudio.DiagnosticsWindow.OptionsPages.PerformanceLoggersPage.&lt;&gt;c__DisplayClass5_0.&lt;SetLoggers&gt;b__3()&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.JoinableTaskFactory.ExecuteJob[T](Func`1 asyncMethod, JoinableTask job)&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.JoinableTask`1.CompleteOnCurrentThread()&#x000D;&#x000A;   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&#x000D;&#x000A;   at Roslyn.VisualStudio.DiagnosticsWindow.VisualStudioDiagnosticsWindowPackage.&lt;InitializeAsync&gt;d__3.MoveNext() in C:\Users\PC\Desktop\Roslyn\src\VisualStudio\VisualStudioDiagnosticsToolWindow\VisualStudioDiagnosticsWindowPackage.cs:line 96&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.AsyncPackage.&lt;&gt;c__DisplayClass20_0.&lt;&lt;Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize&gt;b__1&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)&#x000D;&#x000A;   at Microsoft.VisualStudio.Services.VsTask.GetResult()</description>
    <guid>{49E24138-9EE3-49E0-8EDE-6B39F49303BF}</guid>
    <hr>80131513</hr>
  </entry>

Youssef1313 avatar Aug 11 '22 13:08 Youssef1313

This no longer reproduces on my side. Closing.

Youssef1313 avatar Aug 17 '22 20:08 Youssef1313