【发布时间】:2014-05-13 10:46:33
【问题描述】:
在 Visual Studio express 2012 update 4 下,我创建了 windows phone 应用程序,为此我添加了 Windows Phone 单元测试应用程序。当我尝试运行测试时,Tests 输出窗口显示以下错误:
------ Run test started ------
Failed to import IDeployService. Cannot proceed with xap deployment. This failure can be observed if the component model cache (typically located in %LocalAppData%\Microsoft\VisualStudio\[version]\ComponentModelCache) is not up-to-date. To come out of this error, close all instances of visual studio, delete the component model cache folder and try again.
Unit tests in source D:\projekty\PhoneApp3\TestApp1\Bin\x86\Debug\TestApp1.dll cannot be run. Please create a Windows Store or Windows Phone Unit Test project.
========== Run test finished: 0 run (0:00:00,0009998) ==========
删除%LocalAppData%\Microsoft\VisualStudio\[version]\ComponentModelCache 没有帮助
编辑: 如果我在 VS 2013 Express for Windows 中打开相同的解决方案,我可以成功运行这些测试
【问题讨论】:
-
可爱的错误,我应该把它装在墙上:D
-
也许尝试关闭 VS,删除该文件夹,删除您的
/bin和/obj文件夹,重新构建,然后重试?
标签: c# unit-testing visual-studio-2012 windows-phone