2011-08-31 128 views
9

我从发布文件夹中开始我的计划。在我的Windows 7 64位机器上工作。程序停止工作,问题事件名称:t CLR20r3

在虚拟机Windows 7 32位它工作。

在第三台计算机与Windows 7是无法正常工作的64位。

在我已经安装了.NET Framework 4的每一台机器,我的项目中使用.NET Framework 3.5的,因为我使用的SQLite数据库,和SQLite DLL我的理解需要为项目进行.NET Framework 3.5的。

我使用Visual Studio 2010 Express版本,SQLite数据库。

下面是从第三计算机错误:

Description: 
Stopped working 

Problem signature: 
Problem Event Name: CLR20r3 
Problem Signature 01: geotest.exe 
Problem Signature 02: 1.0.0.0 
Problem Signature 03: 4e58f462 
Problem Signature 04: GeoTest 
Problem Signature 05: 1.0.0.0 
Problem Signature 06: 4e58f462 
Problem Signature 07: f 
Problem Signature 08: 12 
Problem Signature 09: System.BadImageFormatException 
OS Version: 6.1.7600.2.0.0.256.1 
Locale ID: 1033 

回答

1

在发行文件夹没有System.Data.SQLite.DLL,这是问题。现在,当我复制一切正在工作。

8

公共语言运行库从版本3.0以后使用不同的方法来加载一个混合模式组件(一个含有管理本机代码)等的SQLite 。由于SQLite的是针对.NET Framework 2.0中内置,我们必须明确告诉了CLR使用加载混合模式组件的旧路2.0:

添加(或更新)的app.config在您的项目:

<configuration> 
    <startup useLegacyV2RuntimeActivationPolicy="true"> 
    <supportedRuntime version="v4.0"/> 
    </startup> 
</configuration> 

其他问题还透露更多的信息,在此:SQLite-specific/generic explanation

+0

我有类似的问题。你的解决方案对我来说很好。非常感谢你的帮助。 :) – Tina