包括X32或x64 System.Data.SQLite.dll文件正确

问题描述:

我正在寻找关于它的互联网上,但我不知道该怎么做。
我发现我需要在我的Program.csproj文件中的一些代码。

I was searching on internet about it but I'm not sure exactly what to do. I found out that I need to include some code in my Program.csproj file.

当我打开Program.csproj它说:

When I open Program.csproj it says

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <ProjectView>ShowAllFiles</ProjectView>
  </PropertyGroup>

</Project>

这是代码,我需要包括:

this is code which I need to include:

<Reference 
       Include="System, Version=1.0.66.0, Culture=neutral, processorArchitecture=MSIL"  
         Condition=" '$(Platform)' == 'AnyCPU' ">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>library\sqlite\x32\System.Data.SQLite.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference 
         Include="System, Version=1.0.66.0, processorArchitecture=MSIL" 
         Condition=" '$(Platform)' == 'x64' ">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>library\sqlite\x64\System.Data.SQLite.DLL</HintPath>
</Reference>



但我不能肯定这是否是正确的事业我的计划是采取所有的dll从它的根目录并没有从library\sqlite\
可能有人请帮我做是正确的?我只是无法得到它的权利。

But I'm not quite sure if this is correct cause my program is taking all dll from it's root directory and not from "library\sqlite\" Could someone please help me to do it correctly? I just can't get it right

首先我强烈建议你使用v1.0.67 +从的 http://system.data.sqlite.org

First of all I strongly recommend you to use v1.0.67+ from http://system.data.sqlite.org

http://system.data.sqlite.org/blobs/1.0.83.0/sqlite-netFx40-binary-Win32-2010-1.0.83.0.zip
http://system.data.sqlite.org/blobs/1.0.83.0/sqlite-netFx40-binary-x64-2010-1.0.83.0.zip

因此,只要从两个档案(二者均含有相同的版本)中提取值为anycpu文件:

So just extract AnyCPU files from one of two archives (both contain the same version):

System.Data.SQLite.dll
System.Data.SQLite.Linq.dll

虽然x64和x86文件(SQLite.Interop.dll)必须按如下方式复制。
在32位操作系统

While x64 and x86 files (SQLite.Interop.dll) must be copied as follows. On 32-bit operating system


  • 从sqlite的-netFx40-二进制文件Win32-2010-1.0.xx.0 .ZIP进去
    C:\Windows\system32

在64位操作系统


  • 的x64文件进去C:\Windows\system32

  • Win32的推移在C:\Windows\ Syswow64资料

.NET将自动选择正确的互操作文件以包括

.NET will automatically "choose" the right Interop file to include