【发布时间】:2022-11-24 15:52:35
【问题描述】:
我最近将 VS 2022 升级到最新版本,现在我开始看到这些警告:
我使用的是 17.4.0 版本:
堆栈跟踪看起来像:
StreamJsonRpc.ConnectionLostException : The JSON-RPC connection with the remote party was lost before the request could complete. ---> System.OperationCanceledException : The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at async StreamJsonRpc.MessageHandlerBase.WriteAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async StreamJsonRpc.JsonRpc.SendAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async StreamJsonRpc.JsonRpc.InvokeCoreAsync(<Unknown Parameters>)
--- End of inner exception stack trace ---
at async StreamJsonRpc.JsonRpc.InvokeCoreAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.TryInvokeAsync[TService](<Unknown Parameters>)
关于解决这个问题的任何想法?以前从未发生过。
【问题讨论】:
-
每次打开 Visual Studio 时都会发生吗?如果是这样,我会尝试在 Visual Studio 上进行修复(安装程序可以选择这样做)。
-
@TimothyG。它似乎发生在我开始构建过程时。
-
好的 - 我仍然会从修复 Visual Studio 开始。也有人推荐了resetting settings,你也可以试试。我在 Visual Studio 反馈论坛上看到了一些与此类似的已记录问题,因此此版本的 Visual Studio 可能存在错误。我使用的是预览版 (17.5.0 Preview 1),还没有看到这种情况发生。
-
我升级到 17.4.0 后遇到了同样的问题。它通常在 Visual Studio 运行 30 到 60 分钟后发生。当 Visual Studio 在后台运行时,它似乎也会发生。一旦在CodeAnalysis(ConnectionLostException)中出现这样的错误,每隔几秒就会有无穷无尽的错误。
-
@BenjaminFreitag 在 17.4.1 中仍然这样做。请参阅我在评论中的链接以在此处回答。