2013-11-23 47 views
0

我有一个包含一些MSTest单元测试的项目,但是,当我尝试运行它们时,测试运行器没有注意到它们。Visual Studio 2010无法识别MSTests

我在.proj文件,因此ProjectTypeGuids

<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> 

测试是否正确和公共归属,像这样:使用Microsoft.VisualStudio.TestTools.UnitTesting

;

namespace WebService.UnitTest 
{ 
    [TestClass] 
    public class MyTests 
    { 
     [TestMethod] 
     public void MyTest() 
     { 
      Assert.Fail("At least the test is running!"); 
     } 
    } 
} 

但是当我运行(在溶液中的所有测试),我看到消息No tests were run because no tests are loaded or the selected tests are disabled

我还需要改变什么才能让测试跑步者将这个项目作为测试项目来进行测试?

回答

0

我不知道为什么这只是工作,但我从解决方案中删除项目,然后再次添加它。

如果任何人都可以给我任何建议刚刚发生的事情,那将是不胜感激。

相关问题