5

尝试在 VS 2017 上激活实时单元测试时出现此错误:

 [TestRunner 1] Failed to initialize client proxy: could not connect to test process.
FatalError - System.AggregateException: One or more errors occurred. ---> Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Failed to initialize client proxy: could not connect to test process.
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.InitializeExtensions(IEnumerable`1 sources)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsHandler eventHandler)

此错误的其他类似解决方案说它可能是权限,所以我已经尝试以管理员身份运行 VS2017,但这没有用。和其他解决方案说,我需要以不同的方式运行测试,但这是用于实时单元测试,所以我认为它们不是可行的选择。我什至从已经存在的项目中创建了一个新的单元测试项目,但我仍然收到此错误。

更新:测试位于在 VS2017 企业版上运行的 MsTest V2 测试项目中,它正在使用 Git 版本控制在 .Net 框架 4.5.2 下测试 MVC 网页项目。

4

1 回答 1

1

在我的情况下,问题是由于我的运行设置文件配置错误引起的。

如果您使用 testsettings ,请尝试在不使用它的情况下执行测试。

于 2018-03-27T13:17:11.947 回答