繁体   English   中英

将winform应用程序移植到mac上的monodevelop

[英]Porting a winform app to monodevelop on mac

我正在尝试使用monodevelop将在Visual Studio中创建的winforms应用程序移植到Mac。 解决编译错误后,当我运行程序时,应用程序输出以下异常:

System.NullReferenceException: Object reference not set to an instance of an object
 at System.Windows.Forms.TextBoxBase.set_Lines (System.String[] value) [0x00000] in <filename unknown>:0

  at (wrapper remoting-invoke-with-check) System.Windows.Forms.TextBoxBase:set_Lines (string[])

  at WindowsFormsApplication1.Main_Form.amp_portante_ValueChanged (System.Object Sender) [0x00025] in /Users/giuseppe/Desktop/CRUZER/Csound Converter/WindowsFormsApplication1/Main_Form.cs:381

  at KnobControl.KnobControl.OnValueChanged (System.Object sender) [0x00000] in <filename unknown>:0

  at KnobControl.KnobControl.set_Value (Int32 value) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) KnobControl.KnobControl:set_Value (int)
  at WindowsFormsApplication1.Main_Form.textb2_TextChanged (System.Object sender, System.EventArgs e) [0x00085] in /Users/giuseppe/Desktop/CRUZER/Csound Converter/WindowsFormsApplication1/Main_Form.cs:1023 
  at System.Windows.Forms.Control.OnTextChanged (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.TextBoxBase.OnTextChanged (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.TextBoxBase.set_Text (System.String value) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.TextBox.set_Text (System.String value) [0x00000] in <filename unknown>:0 
  at WindowsFormsApplication1.Main_Form.SimpleFM_Conf () [0x00058] in /Users/giuseppe/Desktop/CRUZER/Csound Converter/WindowsFormsApplication1/Main_Form.cs:45 
  at WindowsFormsApplication1.Main_Form.Main_Form_Load (System.Object sender, System.EventArgs e) [0x00012] in /Users/giuseppe/Desktop/CRUZER/Csound Converter/WindowsFormsApplication1/Main_Form.cs:359 
  at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00000] in <filename unknown>:0

该应用程序在Visual Studio中完美运行,我不知道应该做什么。

您可能有一个自定义控件(KnobControl),您无法实例化。

也许你没有这个控件或者这个控件不能用mono编译。

看看Main_Form.cs中的第381行

问候,

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM