Roslyn: 'Method not found' exception when running VisualStudioSetup in VS 15.7 Preview 1

Created on 16 Mar 2018  路  4Comments  路  Source: dotnet/roslyn

After running either VisualStudioSetup or VisualStudioSetup.Next in the master branch and loading a C# project, after about 5 seconds I get an exception that causes Visual Studio to crash. This is not happening for me on 15.6.1.

This is the inner exception:

```c#
Method not found: 'System.Threading.Tasks.Task Microsoft.VisualStudio.LanguageServices.Remote.ServiceHubRemoteHostClient.RegisterWorkspaceHostAsync(Microsoft.CodeAnalysis.Workspace, Microsoft.CodeAnalysis.Remote.RemoteHostClient)'.

at Roslyn.VisualStudio.DiagnosticsWindow.Remote.RemoteHostClientFactory.d__0.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.Start[TStateMachine](TStateMachine& stateMachine) at Roslyn.VisualStudio.DiagnosticsWindow.Remote.RemoteHostClientFactory.CreateAsync(Workspace workspace, CancellationToken cancellationToken) at Microsoft.VisualStudio.LanguageServices.Remote.RemoteHostClientServiceFactory.RemoteHostClientService.<EnableAsync>d__17.MoveNext() --- 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.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.CodeAnalysis.Remote.RemoteHostClientExtensions.d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
--- 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.CodeAnalysis.SolutionCrawler.SolutionCrawlerRegistrationService.WorkCoordinator.IncrementalAnalyzerProcessor.NormalPriorityProcessor.d__37.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
at Microsoft.VisualStudio.LanguageServices.Remote.RemoteHostClientServiceFactory.SolutionChecksumUpdater.d__8.MoveNext()

Here's the actual call stack that leads to the Report handler:
```c#
    Microsoft.CodeAnalysis.Workspaces.dll!Microsoft.CodeAnalysis.ErrorReporting.FatalError.Report(System.Exception exception, System.Action<System.Exception> handler) Line 156 C#
    Microsoft.CodeAnalysis.Features.dll!Microsoft.CodeAnalysis.SolutionCrawler.SolutionCrawlerRegistrationService.WorkCoordinator.IncrementalAnalyzerProcessor.NormalPriorityProcessor.ResetStatesAsync() Line 487  C#
    [Resuming Async Method] 
    [External Code] 
    Microsoft.CodeAnalysis.Features.dll!Microsoft.CodeAnalysis.SolutionCrawler.SolutionCrawlerRegistrationService.WorkCoordinator.IncrementalAnalyzerProcessor.NormalPriorityProcessor.ResetStatesAsync() Line 476  C#
    Microsoft.CodeAnalysis.Features.dll!Microsoft.CodeAnalysis.SolutionCrawler.SolutionCrawlerRegistrationService.WorkCoordinator.IncrementalAnalyzerProcessor.NormalPriorityProcessor.ExecuteAsync() Line 138  C#
    Microsoft.CodeAnalysis.Features.dll!Microsoft.CodeAnalysis.SolutionCrawler.IdleProcessor.ProcessAsync() Line 93 C#
    [Resuming Async Method] 
    [External Code] 
Area-IDE

Most helpful comment

This isn't the issue that we were otherwise seeing. @Neme12, what happens if you delete C:\Users\<username>\AppData\Local\Microsoft\VisualStudio\15.0_<randomjunk>RoslynDev, do a full rebuild of the entire solution, and F5 again?

All 4 comments

I think this is a known issue. Tagging @jasonmalinowski to confirm.
You can either setup on 15.6 instead of 15.7, or wait a couple of days for an updated preview 1 of 15.7.

This isn't the issue that we were otherwise seeing. @Neme12, what happens if you delete C:\Users\<username>\AppData\Local\Microsoft\VisualStudio\15.0_<randomjunk>RoslynDev, do a full rebuild of the entire solution, and F5 again?

And to be clear: rebuild solution. Do not rebuild a project.

@jasonmalinowski Deleting the folder helped. Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

OndrejPetrzilka picture OndrejPetrzilka  路  3Comments

NikChao picture NikChao  路  3Comments

orthoxerox picture orthoxerox  路  3Comments

AdamSpeight2008 picture AdamSpeight2008  路  3Comments

vbcodec picture vbcodec  路  3Comments