不能运行在VS2012测试 [英] Can't Run Tests in VS2012

查看:280
本文介绍了不能运行在VS2012测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人遇到下面的错误尝试运行在Visual Studio防爆preSS 2012单元测试网页的时候?

Has anybody run into the following error when trying to run unit tests in Visual Studio Express 2012 For Web?:

MSTestAdapter无法发现测试,因为经典的模式帮助不可用。如果TestSettings文件已被选中,取消选中,然后重试。

MSTestAdapter could not discover the test because the classic mode helper is not available. If a TestSettings file has been selected, unselect it and try again.

我在Visual Studio 2012 RC的解决方案,其中包含了几个应用程序,一些类库,和几个单元测试项目。当的Visual Studio 2012发布后,我改变了以防爆preSS对于Web。一切的编译和运行良好,但任何时候我尝试运行单元测试,我得到上述错误。

I had a solution in Visual Studio 2012 RC which contains a couple of applications, several class libraries, and a couple of unit test projects. When Visual Studio 2012 was released, I changed over to Express For Web. Everything's compiling and running fine, but any time I try to run unit tests I get the above error.

作为测试,余卸载单元测试项目和除去TestSettings文件并增加了新的单元测试项目与一个测试,这是一个简单的真断言。然而,错误仍然存​​在。

As a test, I unloaded the unit test projects and removed the TestSettings file and added a new unit test project with one test, which is a simple true assert. However, the error persists.

谷歌搜索尚未打开了很多的事情对我来说。各种网站上,但没有实质性的一些相关的帖子,只是还没有。 (也许别人已经有更多的运气?),它看起来像测试框架失败之前,甚至试图调用MSTest的,但什么也好奇的是,我无法找到 mstest.exe 在机器上。

Googling hasn't turned up much of anything for me. A few related posts on various sites, but nothing substantial just yet. (Maybe somebody else has had more luck?) It looks like the test framework is failing before it even tries to invoke MSTest, but what's also curious is that I can't find mstest.exe on the machine.

有没有人遇到这一点,解决它?我想我可以移动到NUnit的(虽然他们的网站没有响应,不灌输了不少信心在项目)或类似这种事情的,不过我倒是preFER保持工具的数量下降在可能的情况

Has anybody run into this and solved it? I suppose I could move to NUnit (though their website isn't responding, which doesn't instill a lot of confidence in the project) or something of that nature, though I'd prefer to keep the number of tools down where possible.

推荐答案

我有同样的问题。我已经删除了一些测试设置文件,它是现在的工作。 要删除文件:

I was having the same problem. I have deleted some test settings files and it is working now. Files to be removed:

  • Local.testsettings

  • Local.testsettings

SOLUTIONNAME.vsmdi

SOLUTIONNAME.vsmdi

TraceAndTestImpact.testsettings

TraceAndTestImpact.testsettings

步骤:

  • 从溶液中取出所有3个文件

  • Remove all 3 files from the solution

删除解决方案文件夹的所有3个文件

Delete all 3 files from the solution folder

关闭VS12的解决方案,并重新打开它

Close the solution in VS12 and reopen it

<一个href="http://dailywebtips.blogspot.co.uk/2012/09/visual-studio-2012-ex$p$pss-error.html">http://dailywebtips.blogspot.co.uk/2012/09/visual-studio-2012-ex$p$pss-error.html

这篇关于不能运行在VS2012测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆