在Visual Studio中运行测试不可用

时间:2021-10-09 15:38:59

Not strictly a programming question, but definately programming related.

不是严格意义上的编程问题,但绝对是编程相关的。

The option to run tests in Visual Studio is greyed out for some reason. I've just started a File | new MVC Application, using VS2008pro.

在Visual Studio中运行测试的选项由于某种原因显示为灰色。我刚刚开始使用File |新的MVC应用程序,使用VS2008pro。

alt text http://www.olympianbot.co.uk/images/greyed-tests.jpg

alt text http://www.olympianbot.co.uk/images/greyed-tests.jpg

Any idea what causes this / how to resolve it?

知道是什么导致这个/如何解决它?

1 个解决方案

#1


Visual Studio recognizes test projects by a special GUID. If there's a project with the GUID : FAE04EC0-301F-11D3-BF4B-00C04F79EFBC, VS will automatically load tests from it. So make sure that in the .csproj of your test project you have the correct GUID:

Visual Studio通过特殊GUID识别测试项目。如果有一个带GUID的项目:FAE04EC0-301F-11D3-BF4B-00C04F79EFBC,VS将自动加载测试。因此,请确保在测试项目的.csproj中有正确的GUID:

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

#1


Visual Studio recognizes test projects by a special GUID. If there's a project with the GUID : FAE04EC0-301F-11D3-BF4B-00C04F79EFBC, VS will automatically load tests from it. So make sure that in the .csproj of your test project you have the correct GUID:

Visual Studio通过特殊GUID识别测试项目。如果有一个带GUID的项目:FAE04EC0-301F-11D3-BF4B-00C04F79EFBC,VS将自动加载测试。因此,请确保在测试项目的.csproj中有正确的GUID:

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