一些错误信息:
Error --- ProfilingTargetLauncher --- Failed to create collection session
Microsoft.DiagnosticsHub.Collectors.CollectionHubException: 服务没有及时响应启动或控制请求。
(HRESULT: 0xe1110002)
在 Microsoft.DiagnosticsHub.VisualStudio.Collectors.CollectorService.StandardClientTransportConnection.SendCustomMessage(MessageCode messageCode, Object param1, Object param2, Object param3)
在 Microsoft.DiagnosticsHub.VisualStudio.Shell.ProfilingTargetLauncher.LaunchMessageHandler(Object sender, BridgeMessage message)
Info --- LaunchPageViewModel --- Microsoft.DiagnosticsHub.Diagnostics.CollectionStartFailedHubException: “Application.Host”未能启动。引发类型为“Microsoft.DiagnosticsHub.Diagnostics.CollectionStartFailedHubException”的异常。
在 Microsoft.DiagnosticsHub.TasksExtensions.<WhenAllOrException>d__1.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
在 Microsoft.DiagnosticsHub.Sessions.Session.<StartCollectionAsync>d__13.MoveNext()
...
试过了一些解决方案:VS Installer修复、使用Microsoft.DiagnosticsHub.Collection.Service.Msi.x64.msi
修复服务 Visual Studio Standard Collector Service 150。
系统更新后服务启动成功、诊断工具也恢复了。dudu的答案不能解决的话(Visual Studio Standard Collector Service 150服务始终不能成功启动)可以试试更新系统。
试试 SO 上 Unable to start Performance profiler in Visual Studio 2022 的回答中的方法
不行。问题应该是Visual Studio Standard Collector Service 150
这个服务跑不起来
@dudu: 是的 我也有这个怀疑。
对应的英文错误消息是:"The service did not respond to the start or control request in a timely fashion."
– dudu 1周前