简体   繁体   English

在OS X上尝试Mono-获取“错误:未安装框架'Mono / .NET 4.0'。”

[英]Trying Mono on OS X - Getting “Error: Framework 'Mono / .NET 4.0' not installed.”

I have a pretty simple application that I wrote in Visual Studio 2010 in C# using .NET 4.0. 我有一个非常简单的应用程序,我是在Visual Studio 2010中使用.NET 4.0在C#中编写的。 All the form has on it is a couple of Buttons, Labels, a TreeView, a ComboBox and a TextBox. 表单上只有几个按钮,标签,TreeView,ComboBox和TextBox。

I copied the project over to my install of OS X and opened the solution (VS2010) in MonoDevelop. 我将项目复制到我的OS X安装中,并在MonoDevelop中打开了解决方案(VS2010)。 It opens fine (although I don't know how to get the visual designer to show for Form1) - but when I go to run it I get the following error: Error: Framework 'Mono / .NET 4.0' not installed. 它可以很好地打开(尽管我不知道如何让可视设计器为Form1显示)-但是当我运行它时,出现以下错误: Error: Framework 'Mono / .NET 4.0' not installed.

The issue is that I DO have the latest version of Mono installed, and it shows up properly (I think) in MonoDevelop. 问题是我确实安装了最新版本的Mono,并在MonoDevelop中正确显示(我认为)。 When I go to MonoDevelop->Preferences->.NET Runtimes it lists Mono 2.6.7 as the default. 当我转到MonoDevelop-> Preferences->。NET运行时时,它将Mono 2.6.7列为默认值。

So, 所以,

  1. How do I get the visual designer to show for Form1.cs? 如何让可视设计器显示Form1.cs?

  2. How do I get rid of the "Mono / .NET 4.0 not installed" error and get the project to compile and run? 如何摆脱“未安装Mono / .NET 4.0”错误,并使项目编译并运行?

  3. All I did was copy the solution over to OS X and then opened it in MonoDevelop. 我所做的就是将解决方案复制到OS X,然后在MonoDevelop中将其打开。 Is there some conversion process the project needs to go through? 项目需要经历一些转换过程吗?

Thanks in advance! 提前致谢!

Edit : I'd suppose I should give the specific version info. 编辑 :我想我应该提供特定的版本信息。 :) :)

OS X:        10.6.5 Snow Leopard
MonoDevelop: 2.4.2
Mono:        2.6.7 (shown in MonoDevelop in .NET Runtimes as 2.6.7 (Default))

I also started up a new project with a blank GTK form and was able to compile/run it. 我还用空白的GTK表格启动了一个新项目,并能够编译/运行它。

Mono 2.6.7 doesn't provide a .net 4.0/C# 4 profile. Mono 2.6.7不提供.net 4.0 / C#4配置文件。 You have to upgrade to at least Mono 2.8. 您必须至少升级到Mono 2.8。

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

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