我正在使用 Lubuntu 14.04,我想运行需要 Microsoft .NET Framework 4 的软件。因此,我安装了 Mono 及其软件包(mono-devel、mono-complete、referenceassemblies-pcl、ca-certificates-mono、mono-xsp4)。我还安装了 Visual Basic 10.0。
但是当我尝试使用“sudo mono myProgram.exe”运行该软件时,我的控制台输出以下消息:
Unhandled Exception:
System.InvalidOperationException: WinForms_SeeInnerException ---> System.NullReferenceException: Object reference not set to an instance of an object
at Microsoft.VisualBasic.Interaction.GetSetting (System.String AppName, System.String Section, System.String Key, System.String Default) [0x00041] in <052f159205d44babb4f17a8e3eeca1f7>:0
at WindowsApplication1.Luncher..ctor () [0x00059] in <f204b55308eb41d3acb7c261ef634837>:0
at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in <8f2c484307284b51944a1a13a14c0266>:0
--- End of inner exception stack trace ---
at WindowsApplication1.My.MyProject+MyForms.Create__Instance__[T] (T Instance) [0x000ea] in <f204b55308eb41d3acb7c261ef634837>:0
at WindowsApplication1.My.MyProject+MyForms.get_Luncher () [0x00000] in <f204b55308eb41d3acb7c261ef634837>:0
at WindowsApplication1.My.MyApplication.OnCreateMainForm () [0x00007] in <f204b55308eb41d3acb7c261ef634837>:0
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00010] in <052f159205d44babb4f17a8e3eeca1f7>:0
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00001] in <052f159205d44babb4f17a8e3eeca1f7>:0
at WindowsApplication1.My.MyApplication.Main (System.String[] Args) [0x00017] in <f204b55308eb41d3acb7c261ef634837>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: WinForms_SeeInnerException ---> System.NullReferenceException: Object reference not set to an instance of an object
at Microsoft.VisualBasic.Interaction.GetSetting (System.String AppName, System.String Section, System.String Key, System.String Default) [0x00041] in <052f159205d44babb4f17a8e3eeca1f7>:0
at WindowsApplication1.Luncher..ctor () [0x00059] in <f204b55308eb41d3acb7c261ef634837>:0
at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in <8f2c484307284b51944a1a13a14c0266>:0
--- End of inner exception stack trace ---
at WindowsApplication1.My.MyProject+MyForms.Create__Instance__[T] (T Instance) [0x000ea] in <f204b55308eb41d3acb7c261ef634837>:0
at WindowsApplication1.My.MyProject+MyForms.get_Luncher () [0x00000] in <f204b55308eb41d3acb7c261ef634837>:0
at WindowsApplication1.My.MyApplication.OnCreateMainForm () [0x00007] in <f204b55308eb41d3acb7c261ef634837>:0
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () [0x00010] in <052f159205d44babb4f17a8e3eeca1f7>:0
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) [0x00001] in <052f159205d44babb4f17a8e3eeca1f7>:0
at WindowsApplication1.My.MyApplication.Main (System.String[] Args) [0x00017] in <f204b55308eb41d3acb7c261ef634837>:0
希望您能帮助我解决这个问题。提前感谢您的帮助 :)