2012-07-11 190 views
1

我试图运行我的单元测试为Windows 8地铁类库我得到的输出窗口中的以下2个错误:不能运行单元测试在VS2012RC

输出:

------ Run test started ------ Error : DEP3000 : Attempts to stop the application failed. This may cause the deployment to fail. App Packages may only be shutdown as part of a Visual Studio build operation.

Failed to activate Metro style unit test executor. Error: The application cannot be started. Try reinstalling the application to fix the problem. 
========== Run test finished: 0 run (0:00:01.2818304) ========== 

其他输出:

------ Discover test started ------ ========== Discover test finished: 7 found (0:00:00.6471091) ========== ------ Run test started ------ Failed to activate Metro style unit test executor. Error: The application cannot be started. Try reinstalling the application to fix the problem. ========== Run test finished: 0 run (0:00:02.0105835) ==========

有没有人遇到问题?

其他Win8类图书馆或应用程序的单元测试工作正常。

我认为这是解决方案。昨天一切都很顺利。我想有一个Windows更新,也许是搞砸了?

事情我已经尝试:

  • 卸载R·
  • 重新安装的Visual Studio 2012 RC
  • 试图单元测试在其他类库(作品)
  • 试图单元测试在Windows 8应用(作品)
  • 清理/重建解决方案
  • 调试和发布配置
  • 增加另一个测试项目,以解决方案和卸载其他项目(工程)

赵彤规格:

  • 的Visual Studio 2012 RC版本:11.0.50522.1
  • Windows 8的RC版本8400
  • 64位操作系统
  • 已经resharper 7,卸载它。
+0

我已将所有测试复制到同一解决方案中的另一个测试项目,现在它可以正常工作。有没有人有解释? – 2012-07-11 19:41:32

+0

您在项目中是否有UnitTest设置文件? – k0stya 2012-07-11 21:26:25

+0

@ k0stya我没有看到项目/解决方案中的测试设置文件,但我认为这在winRT或vs2012中是正常的。 – 2012-07-12 16:41:28

回答

2

我有同样的问题,但是当我将生成配置设置为x86(Configuration Manager,Active Solution Platform)时,它突然生效。如果我将配置设置为AnyCPU或x64,则会出现“执行失败...”错误。
我相信测试执行器是一个32位应用程序,它无法加载64位库。

+1

供参考:不适合我。设置是否改变,仍然有错误。 – Akku 2012-11-22 08:29:08

+0

保存我的一天,谢谢! – 2013-04-16 12:03:12

+1

也不适合我 – jeff 2013-07-02 07:30:43