尝试使用mono-4.2.2 for Windows

时间:2016-02-20 22:40:59

标签: .net windows mono

我刚刚在Windows XP SP3笔记本电脑上下载并安装了适用于Windows的mono-4.2.2.30(安装文件名: mono-4.2.2.30-gtksharp-2.12.30-win32-0.msi < / em>的) 它将自己安装到 C:\ Program Files \ Mono 目录中。 我在〜/ .bashrc

中定义了Mono的bin文件夹

当我从Mono bin目录运行任何命令,例如 mcs mono 时,它总是会出现此错误:

sh: /c/Program Files/Mono/bin/mono: binary file cannot be executed: Exec format error

使用 MSYS ConEmu 终端模拟器上出现此错误,但是如果我在其他shell上尝试使用 cmd.exe 或< strong> git bash 出现相同或类似的错误。

我想使用Mono for Windows的原因是因为我想在我的Windows XP笔记本电脑上使用.NET 4.6应用程序。我已经在Mac OSX上安装了Mono,并且我已成功运行.NET应用程序。

通过 ldd 检查Mono命令会以简短形式给出相同的错误:“Exec format error”但是,通过文件检查相同的命令返回:

$ file /c/Program\ Files/Mono/bin/mcs
/c/Program Files/Mono/bin/mcs: POSIX shell script, ASCII text executable
$ file /c/Program\ Files/Mono/bin/mono
/c/Program Files/Mono/bin/mono: PE32 executable (console) Intel 80386, for MS Windows

我不确定这里有什么问题。有人能帮我吗?感谢。

1 个答案:

答案 0 :(得分:1)

Mono与WindowsXP不兼容。