完全公开,我自己回答这个问题,因为我找了 4 个小时的答案并没有找到,最终我自己弄明白了。所以希望如果其他人有这个问题,这可以帮助他们。
当 Visual Studio 打开一个项目时,它会关闭并且没有错误消息。
打开事件查看器会显示一个错误事件,其中包含 .NET 运行时的来源。错误事件如下所示:
Application: devenv.exe
Framework Version: v4.0.30319
Description: The application requested process termination through System.Environment.FailFast(string message).
Message: System.InvalidOperationException: Controller terminated before accepting connections. Exit code: 9 (NodeInvalidArgument).
at Microsoft.ServiceHub.Client.NodeHubController.<StartAsync>d__2.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 Microsoft.ServiceHub.Client.HubClient.<LaunchOrFindControllerAsync>d__37.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 Microsoft.ServiceHub.Client.HubClient.<GetLocationServiceRpcAsync>d__38.MoveNext()
--- …Run Code Online (Sandbox Code Playgroud) windows node.js windows-10 visual-studio-2015 visual-studio-2017