Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 正确包含x32或x64 System.Data.SQLite.dll文件_C#_Sqlite_System.data.sqlite - Fatal编程技术网

C# 正确包含x32或x64 System.Data.SQLite.dll文件

C# 正确包含x32或x64 System.Data.SQLite.dll文件,c#,sqlite,system.data.sqlite,C#,Sqlite,System.data.sqlite,我在网上搜索过,但我不知道该怎么办。 我发现我需要在Program.csproj文件中包含一些代码 当我打开Program.csproj时,它说 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <ProjectView>ShowAllFiles</ProjectView> </PropertyGroup&

我在网上搜索过,但我不知道该怎么办。 我发现我需要在Program.csproj文件中包含一些代码

当我打开Program.csproj时,它说

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

</Project>

显示所有文件
这是我需要包括的代码:

<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>

假的
library\sqlite\x32\System.Data.sqlite.dll
假的
假的
library\sqlite\x64\System.Data.sqlite.DLL
但我不确定这是否正确,因为我的程序从它的根目录而不是“library\sqlite”中获取所有dll
有人能帮我把它做好吗?我就是做不好

首先,我强烈建议您使用v1.0.67+

因此,只需从两个归档文件中的一个(都包含相同的版本)提取任意CPU文件即可:

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

  • 来自sqlite-netFx40-binary-Win32-2010-1.0.xx.0.zip的文件进入 C:\Windows\system32
关于64位操作系统

  • x64文件位于C:\Windows\system32中
  • Win32进入C:\Windows\SysWOW64
.NET将自动“选择”要包含的正确互操作文件

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
System.Data.SQLite.dll
System.Data.SQLite.Linq.dll