简体   繁体   English

无法在MonoDevelop中打开ASP.NET MVC 3解决方案的测试项目

[英]Cannot open ASP.NET MVC 3 solution's test project in MonoDevelop

If I create an ASP.NET MVC 3 (with Razor) application in Visual Studio 2010, and have it also create an associated test project, I am not able to open the test project in MonoDevelop. 如果我在Visual Studio 2010中创建一个ASP.NET MVC 3(带有Razor)应用程序,并且还创建了一个关联的测试项目,则无法在MonoDevelop中打开测试项目。

I have the latest version of MonoDevelop (2.6 beta 1) installed, with Mono Framework 2.10.1, running on OS X. 我安装了最新版本的MonoDevelop(2.6 beta 1),并在OS X上运行了Mono Framework 2.10.1。

When I open the solution, I get the following error in MonoDevelop: 打开解决方案时,在MonoDevelop中出现以下错误:

"Could not load project '/Users/apps/Code/C#/MvcApplication2/MvcApplication2.Tests/MvcApplication2.Tests.csproj' with unknown item type '{3AC096D0-A1C2-E1C2-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}'" “无法加载未知项目类型为'{3AC096D0-A1C2-E1C2-1390-A8335801FDAB}的项目'/Users/apps/Code/C#/MvcApplication2/MvcApplication2.Tests/MvcApplication2.Tests.csproj';{FAE04EC0-301F-11D3 -BF4B-00C04F79EFBC}'”

The project "MvcApplication2.Test" then shows as (Load failed) under the solution explorer. 然后,项目“ MvcApplication2.Test”在解决方案资源管理器下显示为(加载失败)。

Is there something that I can do to get this project to load? 我可以做些什么来加载该项目? Or is this project type not supported by MonoDevelop? 还是MonoDevelop不支持此项目类型?

That's normal. 那很正常 When you create a new Test Project in Visual Studio by default it uses Microsoft Test Framework, meaning that the only support you could open it is Visual Studio which has the necessary assemblies installed. 默认情况下,当您在Visual Studio中创建新的测试项目时,它将使用Microsoft Test Framework,这意味着您可以打开它的唯一支持是安装了必要程序集的Visual Studio。 To make this work on Mono you will need to use some other testing framework such as NUnit for example. 要使此功能在Mono上起作用,您将需要使用其他测试框架,例如NUnit。

正确,MonoDevelop不支持Microsoft测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM