ubuntu安装mono环境(二)

接上篇,上篇仅安装了Mono本身,并没有安装libgdiplus、gtk-sharp、mod_mono、MonoDevelop 等其他相关的软件。 这篇主要是配置安装libgdiplus。 0×00准备工作 先在VS2012上编译一个winform,代码如下: using System; using System.Windows.Forms; namespace FormsTest { static class Program { /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form()); } } } 尝试在ubuntu上用mono运行: nike@NIKE-PC:~$ cd Desktop/ nike@NIKE-PC:~/Desktop$ ls FormsTest.exe nike@NIKE-PC:~/Desktop$ mono FormsTest.exe Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.XplatUI ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System....

March 28, 2014 · 5 分钟 · keepwn
0%