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.
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.
--- 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.
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
at Microsoft.VisualStudio.LanguageServices.Remote.RemoteHostClientServiceFactory.SolutionChecksumUpdater.
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]
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
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?