C# muncul error pada saat menjalankan aplikasi

mohon bantuannya untuk master - master disini saya sedang develop aplikasi dengan menggunakan bahasa C#, pada saat selesai diinstal pada komputer user. Ketika di jalankan muncul pesan error :

\\\\\\\\\\\\\\ Exception Text ************** System.NullReferenceException: Object reference not set to an instance of an object. at APIInsentiveLib.ErrorLogManager.Insert(String ErrID, String Object, String ErrDescription) at APIInsentiveSystem.frmMain.MDIMenu_Load(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

\\\\\\\\\\\\\\ Loaded Assemblies ************** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.7.2117.0 built by: NET47REL1LAST CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll ---------------------------------------- APIInsentiveSystem Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/Elsa/Desktop/Insentive/APIInsentiveSystem.exe ---------------------------------------- System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.7.2117.0 built by: NET47REL1LAST CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System Assembly Version: 4.0.0.0 Win32 Version: 4.7.2117.0 built by: NET47REL1LAST CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.7.2117.0 built by: NET47REL1LAST CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.7.2053.0 built by: NET47REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll ---------------------------------------- System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.7.2117.0 built by: NET47REL1LAST CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll ---------------------------------------- System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.7.2117.0 built by: NET47REL1LAST CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- APIInsentiveLib Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/Elsa/Desktop/Insentive/APIInsentiveLib.DLL ---------------------------------------- System.Data Assembly Version: 4.0.0.0 Win32 Version: 4.7.2117.0 built by: NET47REL1LAST CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll ---------------------------------------- System.Transactions Assembly Version: 4.0.0.0 Win32 Version: 4.7.2117.0 built by: NET47REL1LAST CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll ---------------------------------------- System.EnterpriseServices Assembly Version: 4.0.0.0 Win32 Version: 4.7.2053.0 built by: NET47REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll ----------------------------------------

\\\\\\\\\\\\\\ JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.

For example:

When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.

avatar ferdy11
@ferdy11

1 Kontribusi 0 Poin

Diperbarui 6 tahun yang lalu

1 Jawaban:

penyebab error nya seperti ini om misal nya


class CustomClass{
public int bilangan{get; set;}
}

kemudian class di atas di gunakan dengan cara seperti ini

CustomClass cs;
cs.bilangan = 1;

ini di karenakan variable dari cs dari CustomClass tidak di initialisasi dulu.

Kalau menggunakan library usahakan di komputer client terdapat library nya baik dalam 1 direktori dengan file utama atau terdaftar dalam windowsnya.

Semoga membantu

avatar unhackme
@unhackme

27 Kontribusi 13 Poin

Dipost 6 tahun yang lalu

Login untuk ikut Jawaban