当前位置:编程学习 > C#/ASP.NET >>

C# 写的Activex控件使用System.Data.SQLite.dll问题

C#写的Activex控件,使用了sqlite数据库,引用了System.Data.SQLite.dll文件,控件发布后在32位的操作系统上使用都正常,但是在有的win7 64位系统上使用就会报如下的错误:
有关调用实时(JIT)调试而不是此对话框的详细信息, 请参见此消息的结尾。  ************** 异常文本 ************** System.BadImageFormatException: 未能加载文件或程序集“System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139”或它的某一个依赖项。试图加载格式不正确的程序。 文件名:“System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139”    在 WebPOS.Sqlite..ctor(String dbName)    在 WebPOS.Sqlite.get_POSRetail()    在 WebPOS.MainApp.updateUserInfo(String url)    在 WebPOS.DownLoadDataByOffLine.DownLoadData()    在 WebPOS.DownLoadDataByOffLine.DownLoadDataByOffLine_Shown(Object sender, EventArgs e)    在 System.Windows.Forms.Form.OnShown(EventArgs e)    在 System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)    在 System.Threading.ExecutionContext.runTryCode(Object userData)    在 System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)    在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)    在 System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)    在 System.Windows.Forms.Control.InvokeMarshaledCallbacks()  警告: 程序集绑定日志记录被关闭。 要启用程序集绑定失败日志记录,请将注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD)设置为 1。 注意: 会有一些与程序集绑定失败日志记录关联的性能损失。 要关闭此功能,请移除注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog]。    ************** 已加载的程序集 ************** mscorlib     程序集版本: 2.0.0.0     Win32 版本: 2.0.50727.5420 (Win7SP1.050727-5400)     基本代码: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll ---------------------------------------- POSLOGIN     程序集版本: 1.0.0.0     Win32 版本: 1.0.0.0     基本代码: file:///C:/Program%20Files%20(x86)/Burgeon/WebPOS/POSLOGIN.exe ---------------------------------------- System.Windows.Forms     程序集版本: 2.0.0.0     Win32 版本: 2.0.50727.5420 (Win7SP1.050727-5400)     基本代码: 
file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System     程序集版本: 2.0.0.0     Win32 版本: 2.0.50727.5420 (Win7SP1.050727-5400)     基本代码: 
file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing     程序集版本: 2.0.0.0     Win32 版本: 2.0.50727.5420 (Win7SP1.050727-5400)     基本代码: 
file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- WebPOS     程序集版本: 1.0.667.0     Win32 版本: 1.0.667.0     基本代码: file:///C:/Program%20Files%20(x86)/Burgeon/WebPOS/WebPOS.DLL ---------------------------------------- System.Data     程序集版本: 2.0.0.0     Win32 版本: 2.0.50727.5420 (Win7SP1.050727-5400)     基本代码: 
file:///C:/Windows/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll ---------------------------------------- System.Xml     程序集版本: 2.0.0.0     Win32 版本: 2.0.50727.5420 (Win7SP1.050727-5400)     基本代码: 
file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- System.Configuration     程序集版本: 2.0.0.0     Win32 版本: 2.0.50727.5420 (Win7SP1.050727-5400)     基本代码: 
file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll ---------------------------------------- dx8svoj5     程序集版本: 1.0.667.0     Win32 版本: 2.0.50727.5420 (Win7SP1.050727-5400)     基本代码: 
file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- Newtonsoft.Json     程序集版本: 1.3.0.0     Win32 版本: 1.3.0.0     基本代码: file:///C:/Program%20Files%20(x86)/Burgeon/WebPOS/Newtonsoft.Json.DLL ---------------------------------------- System.Windows.Forms.resources     程序集版本: 2.0.0.0     Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)     基本代码:
file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll ---------------------------------------- mscorlib.resources     程序集版本: 2.0.0.0     Win32 版本: 2.0.50727.5420 (Win7SP1.050727-5400)     基本代码: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll ----------------------------------------  ************** JIT 调试 ************** 要启用实时(JIT)调试, 该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置 jitDebugging 值。 编译应用程序时还必须启用 调试。  例如:   <configuration>     <system.windows.forms jitDebugging="true" /> </configuration>  启用 JIT 调试后,任何无法处理的异常 都将被发送到在此计算机上注册的 JIT 调试器, 而不是由此对话框处理。   调用的详细信息,请参阅此消息的结尾 刚刚在实时(JIT)调试而不是此对话框。  **************异常文本************** :意外Newtonsoft.Json.JsonReaderException的字符时遇到的解析值:

但有的win 7 64位系统又可以使用。请问各位大侠们,这可能会和什么有关系呢? --------------------编程问答-------------------- 没人吗?自己顶一下 --------------------编程问答-------------------- System.Data.SQLite.dll是x86的,换一个x64的 --------------------编程问答-------------------- 这种方法我在网上看到过了,可是不是很实际,我又不能控制使用者电脑的环境,希望有其它更好的办法。
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,