Can't run Unit Tests In VS2012RC

妖精的绣舞 提交于 2019-12-11 11:01:57

问题


I'm trying to run my unit tests for a Windows 8 Metro Class library i get the following 2 errors in the output window:

Output:

------ 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) ==========

Other output:

------ 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) ==========

Has anybody run into the problem?

Unit tests in other Win8 class librarys or apps works fine.

I think it's something with the solution. Yesterday everything went fine. I guess there was a Windows update, maybe that screwed things up?

Things i've tried:

  • Uninstalled R#
  • Reinstalled Visual Studio 2012 RC
  • Tried unit tests in other class library (works)
  • Tried unit tests in Windows 8 app (works)
  • Cleaned / Rebuild solution
  • Debug and Release Configuration
  • Added another Test project to the solution and unload other project(works)

Techincal Specs:

  • Visual Studio 2012 RC Version: 11.0.50522.1
  • Windows 8 RC Build 8400
  • 64 Bit OS
  • Had resharper 7, Uninstalled it.

回答1:


I had the same problem, but when I set the build configuration to x86 (Configuration Manager, Active Solution Platform) it suddenly works. If I set the configuration to AnyCPU or x64, I get the "Failed to execute..." error.
I belive the test executer is a 32-bit application and it can not load a 64-bit library.



来源:https://stackoverflow.com/questions/11439984/cant-run-unit-tests-in-vs2012rc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!