問題如圖:

框中詳細錯誤資訊:
有關呼叫實時(JIT)除錯而不是此對話框的詳細資訊,
請參見此訊息的結尾。
************** 例外文本 **************
System.BadImageFormatException: 未能加載檔案或程式集“NIST.Refprop.Interface, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null”或它的某一個依賴項。試圖加載格式不正確的程式。
檔案名:“NIST.Refprop.Interface, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null”
在 WindowsFormsApplication1.Form1.button1_Click(Object sender, EventArgs e)
在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
在 System.Windows.Forms.Button.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
警告: 程式集系結日志記錄被關閉。
要啟用程式集系結失敗日志記錄,請將注冊表值 [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD)設定為 1。
注意: 會有一些與程式集系結失敗日志記錄關聯的性能損失。
要關閉此功能,請移除注冊表值 [HKLM\Software\Microsoft\Fusion!EnableLog]。
************** 已加載的程式集 **************
mscorlib
程式集版本:4.0.0.0
Win32 版本:4.0.30319.34209 built by: FX452RTMGDR
基本代碼:file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
WindowsFormsAppRefprop
程式集版本:1.0.0.0
Win32 版本:1.0.0.0
基本代碼:file:///Z:/wenminluo/PSFLSH_Error247_TestProject/bin/Debug/WindowsFormsAppRefprop.exe
----------------------------------------
System.Windows.Forms
程式集版本:4.0.0.0
Win32 版本:4.0.30319.34209 built by: FX452RTMGDR
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
程式集版本:4.0.0.0
Win32 版本:4.0.30319.34209 built by: FX452RTMGDR
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
程式集版本:4.0.0.0
Win32 版本:4.0.30319.34209 built by: FX452RTMGDR
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms.resources
程式集版本:4.0.0.0
Win32 版本:4.0.30319.33440 built by: FX45W81RTMREL
基本代碼: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
----------------------------------------
mscorlib.resources
程式集版本:4.0.0.0
Win32 版本:4.0.30319.33440 built by: FX45W81RTMREL
基本代碼:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
************** JIT 除錯 **************
要啟用實時(JIT)除錯,
該應用程式或計算機的 .config 檔案(machine.config)的 system.windows.forms 節中必須設定
jitDebugging 值。
編譯應用程式時還必須啟用
除錯。
例如:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
啟用 JIT 除錯后,任何未經處理的例外
都將被發送到在此計算機上注冊的 JIT 除錯器,
而不是由此對話框處理。
測驗程式是一個c#采用托管的方式呼叫一個c++寫的dll,報錯。是否有同仁遇到過類似問題,還望解答,感激不敬!!
uj5u.com熱心網友回復:
NIST.Refprop.Interface.dll沒找到或者是NIST.Refprop.Interface.dll參考的其他庫不存在
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/138570.html
標籤:C#
上一篇:xtraReport做winformReport時兩行單元格怎么合并
下一篇:請問可不可以把下面的委托復用
