0

我有以下问题:无法在虚拟 Windows 8 机器下使用 mstest 命令执行自动测试。我启用了 mstest 日志记录,但遇到以下错误:

LocalControllerProxy:异常初始化 ControllerObject 或启动代理进程:System.ArgumentException:路径不是合法形式。在 System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength) 在 System.IO.Path.GetFullPathInternal(String path) 在 System.IO.Path.GetFullPath(String path) 在 Microsoft.VisualStudio.TestTools.Common .ControllerDefaults.GetControllerWorkingDirectory() 在 Microsoft.VisualStudio.TestTools.Controller.ControllerObject..ctor(布尔远程,ControllerConfiguration controllerConfiguration,AgentManager agentManager)在 Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.InitializeController(TestRun 运行)

trx 文件中的错误是:

System.ArgumentException:路径不是合法形式。在 System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength) 在 System.IO.Path.GetFullPathInternal(String path) 在 System.IO.Path.GetFullPath(String path) 在 Microsoft.VisualStudio.TestTools.Common .ControllerDefaults.GetControllerWorkingDirectory() 在 Microsoft.VisualStudio.TestTools.Controller.ControllerObject..ctor(Boolean remote, ControllerConfiguration controllerConfiguration, AgentManager agentManager) 在 Microsoft.VisualStudio.TestTools.TestManagement.LocalControllerProxy.InitializeController(TestRun run) 在 Microsoft.VisualStudio。 TestTools.TestManagement.ControllerProxy.QueueTestRunWorker(对象状态)

如果我禁用Admin Approval Mode ,问题就消失了,可以执行测试,但在这种情况下,我无法运行 Metro 应用程序。这就是为什么我需要启用此选项。
有人遇到这样的问题吗?在过去的两天里,我一直在尝试通过互联网找到解决方案,但无济于事。所以我想这不是一个常见的错误。

4

1 回答 1

0

我找到了解决这个问题的方法。

我启动了虚拟机,导航到 mstest.exe 位置 -> 右键单击​​ -> 属性 -> 兼容性选项卡 -> 更改所有用户的设置 -> 以管理员身份运行此程序。

在我看来,这是目前最合适的解决方案。

于 2013-01-11T10:06:16.840 回答