对mono比较熟悉的请进

sh/bash/dash/ksh/zsh等Shell脚本
回复
zjl1234567
帖子: 2
注册时间: 2012-05-29 9:30

对mono比较熟悉的请进

#1

帖子 zjl1234567 » 2012-05-29 9:44

听闻mono可以运行.net 程序,我就测试了一下。

我的系统是ubuntu 11.04 应该是自带mono,并支持.net 2.0和3.0的吧。

我在windows下写了个helloworld程序。

在ubuntu下执行 mono test.exe
命令返回:
The assembly mscorlib.dll was not found or could not be loaded.
It should have been installed in the `/usr/lib/mono/1.0/mscorlib.dll' directory.

然后我到mono目录下看了,只有2.0的目录,没有1.0的目录。这个问题是什么情况?怎么处理?
头像
a14331990
帖子: 604
注册时间: 2009-03-25 9:38
系统: Fedora 22 x86_64

Re: 对mono比较熟悉的请进

#2

帖子 a14331990 » 2012-05-29 13:08

你在linux用mono再编译一遍呀
qq 591799783
email a14331990#hotmail.com a14331990#163.com
头像
tommy007
帖子: 1352
注册时间: 2007-02-18 0:42

Re: 对mono比较熟悉的请进

#3

帖子 tommy007 » 2012-05-29 13:27

难道mono不支持1.0的.net ?

mono正常跑起来了几个程序,就是汉字全方块。 而且用一下就崩溃
头像
a14331990
帖子: 604
注册时间: 2009-03-25 9:38
系统: Fedora 22 x86_64

Re: 对mono比较熟悉的请进

#4

帖子 a14331990 » 2012-05-30 8:33

看下这里
http://www.mono-project.com/CSharp_Compiler
好像现在不支持CSharp 1.0了
qq 591799783
email a14331990#hotmail.com a14331990#163.com
zjl1234567
帖子: 2
注册时间: 2012-05-29 9:30

Re: 对mono比较熟悉的请进

#5

帖子 zjl1234567 » 2012-05-30 9:35

可能是我没说清楚吧。我再说下最新进展。

我只想搭建.net 运行环境,并不需要编译环境。

我看一些资料说,在windows下编译的.net 程序可以直接在mono下运行,不用再编译。

我已经安装mono2.10.2了。我运行的是winform程序。这次报错不是找不到.net的入口库了,而是找不到winform的库和gdi+等库。

mono Test.exe

Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.WindowsFormsSynchronizationContext ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.ThemeEngine ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.ThemeWin32Classic ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.KnownColors ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: gdiplus.dll
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
at System.Drawing.GDIPlus..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Drawing.KnownColors..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Drawing.Color.get_Black () [0x00000] in <filename unknown>:0
at System.Windows.Forms.ThemeWin32Classic..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.ThemeEngine..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control..ctor () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor ()
at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.Control..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.ContainerControl..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.Form..ctor () [0x00000] in <filename unknown>:0
at Test.Form1..ctor () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) Test.Form1:.ctor ()
at Test.Program.Main () [0x00000] in <filename unknown>:0

请教有经验的人士,能在ubuntu下运行.net 的winform程序么?
头像
a14331990
帖子: 604
注册时间: 2009-03-25 9:38
系统: Fedora 22 x86_64

Re: 对mono比较熟悉的请进

#6

帖子 a14331990 » 2012-05-31 14:26

mono!=.net
尤其是图形图象方面
想跨平台运行得改代码
这个工具或许有帮助
http://www.mono-project.com/MoMA
qq 591799783
email a14331990#hotmail.com a14331990#163.com
回复