【发布时间】:2018-08-18 10:13:58
【问题描述】:
全新机器,全新安装 Visual Studio 2017 Enterprise 15.6.0。 我似乎无法调试测试。我收到以下错误:
Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Failed to launch testhost with error: System.AggregateException: One or more errors occurred. () ---> Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException
at Microsoft.VisualStudio.TestPlatform.Client.DesignMode.DesignModeClient.LaunchCustomHost(TestProcessStartInfo testProcessStartInfo)
at Microsoft.VisualStudio.TestPlatform.Client.DesignMode.DesignModeTestHostLauncher.LaunchTestHost(TestProcessStartInfo defaultTestHostStartInfo)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.LaunchHost(TestProcessStartInfo testHostStartInfo, CancellationToken cancellationToken)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.<>c__DisplayClass37_0.<LaunchTestHostAsync>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.<LaunchTestHostAsync>d__37.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources, CancellationToken cancellationToken)
---> (Inner Exception #0) Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException
at Microsoft.VisualStudio.TestPlatform.Client.DesignMode.DesignModeClient.LaunchCustomHost(TestProcessStartInfo testProcessStartInfo)
at Microsoft.VisualStudio.TestPlatform.Client.DesignMode.DesignModeTestHostLauncher.LaunchTestHost(TestProcessStartInfo defaultTestHostStartInfo)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.LaunchHost(TestProcessStartInfo testHostStartInfo, CancellationToken cancellationToken)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.<>c__DisplayClass37_0.<LaunchTestHostAsync>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.<LaunchTestHostAsync>d__37.MoveNext()<---
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources, CancellationToken cancellationToken)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsHandler eventHandler)
Summary: Passed: 0, Failed: 0, Ignored: 0
Duration: 4.82 seconds
我可以运行测试,但我需要逐步调试通过我的测试。
【问题讨论】:
-
用粗体字大声呼救可能会产生与您想象的不同的效果。否则,欢迎来到 SO!
-
使用帮助 > 发送反馈 > 报告问题,让他们知道 15.6.0 的错误。
-
@elgonzo 谢谢!
-
上面提到要断开VPN。对我来说是相反的。调试仅在已连接时起作用。
标签: c# unit-testing visual-studio-2017 .net-core