在Mac上运行C#应用程序时出现单声道错误:System.Drawing.Icon中的IL代码无效

时间:2015-11-17 18:19:15

标签: c# .net macos mono system.drawing

注意:这不是链接问题的重复,因为我不打算开发Mac应用程序。

所以我在.NET 4.5上有一个C#应用程序,它具有以下内容:

  

1)Windows窗体

     

2)参考System.Drawing,EmguCV,Aforge.NET dlls

这在我的Windows系统上完美运行。

当我尝试在使用Mono运行OSX的Mac系统上运行程序时,出现以下错误:

  UnhandledException处理程序中的

异常:System.Windows.Forms.Form的类型初始值设定项引发了异常

     

[错误]致命的未处理的异常:System.TypeInitializationException:System.Windows.Forms.Form的类型初始化程序抛出异常---> System.InvalidProgramException:System.Drawing.Icon中的IL代码无效:.ctor(System.IO.Stream):方法体为空。

     

at(wrapper remoting-invoke-with-check)System.Drawing.Icon:.ctor(System.IO.Stream)

     

在System.Windows.Forms.ResourceImageLoader.GetIcon(System.String name)[0x00000] in:0

     

在System.Windows.Forms.Form..cctor()[0x00000]中:0

有人遇到过这样的事吗?感谢任何建议。

0 个答案:

没有答案
相关问题