gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-30 13:02:39 30 4
gpt4 key购买 nike

我正在尝试使用 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 行

问候,

关于c# - 将 winform 应用程序移植到 mac 上的 monodevelop,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14912714/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com