Content Entry

redhat/centos 5 - mono 版本问题

Published: 2009-12-08 Categories: Software Tags: linux redhat centos el5 mono gmcs mscorlib

问题: 向 redhat/centos 5 移植若干 *.dll 文件,用 gmcs 编译, mono 执行 exe 文件时,遭遇各种 MS-Exception*

排除程序的错,因为 Debian 5 + Linux 2.6.26 + mono 1.9 下测试通过.

redhat/centos 5 默认的安装包版本太老: 1.2,升级到 1.9 ~ 不行, 又升级到 2.0 ~ 不行!浪费我3天时间,最后发现 mono-core-2.0.*-el5-x86_64.rpm 包里的 mscorlib 核心库竟然用 1.0 版本,天杀的!

最后升级到 mono-core 2.4, mscorlib 终于变成 2.0,测试通过.

另:

*.dll 在 Linux 下的路径? 产生于 gmcs 编译时,所以在生产环境下需要固定目录,重新编译,指定路径,如:

gmcs "/out:/opt/soft/bin/soft.exe" "/r:System.dll" "/r:System.Data.dll" "/r:System.Xml.dll" "/r:/opt/labs/Soft.dll" /noconfig /nologo /warn:4 /optimize- /codepage:utf8 /t:exe "/opt/soft/Main.cs" "/opt/soft/AssemblyInfo.cs"

--OK--

comments loading