0

好的,我正在使用 Windows 并安装了 .Net 3.5 和 Mono 2.6 框架。我还安装了 MonoDevelop 并计划使用它。我只需要知道我是否设置为使用 Mono 运行时。

我所有的项目都有 Mono/Microsoft.NET 3.5 的构建选项,但在 Edit->Prefrences->.NET Runtimes 中,我看到的只是 Microsoft.NET。如何将 Mono 运行时添加到此列表并使其成为默认值?还是我什至需要这样做?我想我必须这样做,因为我们的项目将在 Linux 上运行,但不确定如何“确保”我实际上使用的是 Mono 而不仅仅是 .NET?

4

2 回答 2

2

Mono should show up simply by virtue of being installed. You can try reinstalling Mono to see if that helps.

If not, click the "Add" button on the Edit->Preferences->.Net Runtimes page and choose where you installed Mono to, generally it will be something like:

C:\Program Files\Mono-2.6.1

If you want it to be the default, click "Set as Default" while it's highlighted and it should turn bold, indicating it is now the default. There is also a combobox on the main MD toolbar if you want a quicker way of switching between runtimes.

于 2010-02-22T01:40:27.283 回答
0

你不应该在 Windows 上使用 Mono 的编译器来构建你的代码在 Linux 上运行。

根据Performance: Compile in CS, Run in mono on windows and linux 的答案,您可以使用任何编译器编译并使用任何运行时运行,因为编译后的二进制文件是中间语言

您只需要确定您的代码及其使用的库不会进行特定于操作系统的调用、P/Invoke 非托管 DLL 或调用 Mono 中不完整的函数(请注意,这些情况越来越少)

于 2010-02-22T01:45:25.230 回答