有關呼叫實時(JIT)除錯而不是此對話框的詳細資訊,
請參見此訊息的結尾。
************** 例外文本 **************
System.NullReferenceException: 未將物件參考設定到物件的實體。
在 HkeyTray.EC.get_Battery()
在 HkeyTray.EC.UpdateLiveInfo()
在 HkeyTray.EC..ctor()
在 HkeyTray.General..ctor()
在 HkeyTray.Form1.Form1_Load(Object sender, EventArgs e)
在 System.Windows.Forms.Form.OnLoad(EventArgs e)
在 System.Windows.Forms.Form.OnCreateControl()
在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
在 System.Windows.Forms.Control.CreateControl()
在 System.Windows.Forms.Control.WmShowWindow(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
在 System.Windows.Forms.ContainerControl.WndProc(Message& m)
在 System.Windows.Forms.Form.WmShowWindow(Message& m)
在 System.Windows.Forms.Form.WndProc(Message& m)
在 HkeyTray.Form1.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** 已加載的程式集 **************
mscorlib
程式集版本:4.0.0.0
Win32 版本:4.8.4150.0 built by: NET48REL1LAST_C
基本代碼:file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
HkeyTray
程式集版本:1.0.0.15
Win32 版本:1.0.0.15
基本代碼:file:///C:/Program%20Files%20(x86)/Hotkey/Hkeytray.exe
----------------------------------------
System.Windows.Forms
程式集版本:4.0.0.0
Win32 版本:4.8.4150.0 built by: NET48REL1LAST_C
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
程式集版本:4.0.0.0
Win32 版本:4.8.4001.0 built by: NET48REL1LAST_C
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
程式集版本:4.0.0.0
Win32 版本:4.8.3752.0 built by: NET48REL1
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Management
程式集版本:4.0.0.0
Win32 版本:4.8.3752.0 built by: NET48REL1
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll
----------------------------------------
System.Configuration
程式集版本:4.0.0.0
Win32 版本:4.8.3752.0 built by: NET48REL1
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
程式集版本:4.0.0.0
Win32 版本:4.8.3752.0 built by: NET48REL1
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Accessibility
程式集版本:4.0.0.0
Win32 版本:4.8.3752.0 built by: NET48REL1
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
WindowsFormsIntegration
程式集版本:4.0.0.0
Win32 版本:4.8.4150.0 built by: NET48REL1LAST_C
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsFormsIntegration/v4.0_4.0.0.0__31bf3856ad364e35/WindowsFormsIntegration.dll
----------------------------------------
PresentationCore
程式集版本:4.0.0.0
Win32 版本:4.8.4150.0 built by: NET48REL1LAST_C
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_32/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll
----------------------------------------
PresentationFramework
程式集版本:4.0.0.0
Win32 版本:4.8.4150.0
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll
----------------------------------------
WindowsBase
程式集版本:4.0.0.0
Win32 版本:4.8.4150.0 built by: NET48REL1LAST_C
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
System.Xaml
程式集版本:4.0.0.0
Win32 版本:4.8.4121.0 built by: NET48REL1LAST_C
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll
----------------------------------------
UIAutomationTypes
程式集版本:4.0.0.0
Win32 版本:4.8.4121.0 built by: NET48REL1LAST_C
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/UIAutomationTypes/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationTypes.dll
----------------------------------------
mscorlib.resources
程式集版本:4.0.0.0
Win32 版本:4.8.3752.0 built by: NET48REL1
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
System.Core
程式集版本:4.0.0.0
Win32 版本:4.8.4121.0 built by: NET48REL1LAST_C
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms.resources
程式集版本:4.0.0.0
Win32 版本:4.8.3752.0 built by: NET48REL1
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
************** JIT 除錯 **************
要啟用實時(JIT)除錯,
該應用程式或計算機的 .config 檔案(machine.config)的 system.windows.forms 節中必須設定
jitDebugging 值。
編譯應用程式時還必須啟用
除錯。
例如:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
啟用 JIT 除錯后,任何未經處理的例外
都將被發送到在此計算機上注冊的 JIT 除錯程式,
而不是由此對話框處理。
uj5u.com熱心網友回復:
“System.NullReferenceException: 未將物件參考設定到物件的實體。”問題就是這句話,未將物件參考設定到物件的實體,幾乎就是代碼的問題
uj5u.com熱心網友回復:
怎么解決這個問題呢,能不能說說詳細步驟uj5u.com熱心網友回復:
出錯的地方的代碼貼上來啊。 最原始的判斷是你某個變數為空引起的。uj5u.com熱心網友回復:
使用了未賦值的物件。uj5u.com熱心網友回復:
未將物件參考設定到物件的實體。代碼問題,要處理空值狀態啊,uj5u.com熱心網友回復:
你應該是有一個類,但未初始化吧,如果是類的話,你應該new 一個物件,或者從已有的物件賦值給它,類是個抽象的東西,你需要實體化它!~~uj5u.com熱心網友回復:
比如dy.show();這個dy你只是Form dy;了,你需要的是Form dy=new Form();這樣才不會報錯。uj5u.com熱心網友回復:
除錯一下代碼,他會在錯誤的地方停下來,先找到錯誤的地方在哪里,然后你把錯誤代碼截圖發上來,這個問題光說我們也不知道哪錯了uj5u.com熱心網友回復:
看一下代碼或者寫日志,有詳細的堆疊跟蹤uj5u.com熱心網友回復:
HkeyTray.EC.get_Battery() 這個函式有問題。。。除錯一下。。。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/60514.html
標籤:C#
上一篇:關于用vs設計安裝專案的問題
