在 OS X 上尝试 Mono - 出现“错误:框架‘Mono / .NET 4.0’”未安装。”
我有一个非常简单的应用程序,是使用 .NET 4.0 在 Visual Studio 2010 中用 C# 编写的。表单上只有几个按钮、标签、一个 TreeView、一个组合框和一个文本框。
我将项目复制到我安装的 OS X 中,并在 MonoDevelop 中打开解决方案 (VS2010)。它打开得很好(虽然我不知道如何让可视化设计器显示 Form1) - 但是当我去运行它时,我收到以下错误: Error: Framework 'Mono / .NET 4.0 ' 未安装。
问题是我确实安装了最新版本的 Mono,并且它在 MonoDevelop 中正确显示(我认为)。当我进入 MonoDevelop->Preferences->.NET Runtimes 时,它将 Mono 2.6.7 列为默认值。
那么,
如何让可视化设计器在 Form1.cs 中显示?
如何消除“Mono / .NET 4.0 未安装”错误并使项目编译并运行?
我所做的就是将解决方案复制到 OS X,然后在 MonoDevelop 中打开它。项目需要经历一些转换过程吗?
提前致谢!
编辑:我想我应该给出具体的版本信息。 :)
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))
我还启动了一个带有空白 GTK 表单的新项目,并且能够编译/运行它。
I have a pretty simple application that I wrote in Visual Studio 2010 in C# using .NET 4.0. All the form has on it is a couple of Buttons, Labels, a TreeView, a ComboBox and a TextBox.
I copied the project over to my install of OS X and opened the solution (VS2010) in MonoDevelop. 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.
The issue is that I DO have the latest version of Mono installed, and it shows up properly (I think) in MonoDevelop. When I go to MonoDevelop->Preferences->.NET Runtimes it lists Mono 2.6.7 as the default.
So,
How do I get the visual designer to show for Form1.cs?
How do I get rid of the "Mono / .NET 4.0 not installed" error and get the project to compile and run?
All I did was copy the solution over to OS X and then opened it in 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Mono 2.6.7 不提供 .net 4.0/C# 4 配置文件。您必须至少升级到 Mono 2.8。
Mono 2.6.7 doesn't provide a .net 4.0/C# 4 profile. You have to upgrade to at least Mono 2.8.