zoukankan      html  css  js  c++  java
  • System.Data.SQLite安装的相关问题

    在使用System.Data.SQLite的过程中,遇到各种问题,特此记录下。(都被搞的折寿了,不仔细看文档的下场!)

    1.选对.net Framework的版本。
    2.X64和X86的问题,如果项目指定了X64或者X86,则下载对应的SQLite。如果选择AnyCpu,最简单的办法是在程序运行目录下创建X64和X86目录,里面放对应的SQLite.Interop.dll。System.Data.SQLite.Dll会根据程序平台自动选择。
    3.关于Visual C++ XXXX runtime的问题,因为SQLite是VC++开发,所以必须安装对应的Visual C++ XXXX runtime。如果电脑没有这个东西,则会出错。
    4.还是Visual C++ XXXX runtime的问题(被恶心到了)。但是有的用户电脑已经安装了这玩意,还是会提示“Unable to load DLL 'SQLite.Interop.dll': 找不到指定的模块”的异常。怎么回事呢,我也不懂C++,貌似是什么静态连接的问题。
    下载“Precompiled Statically-Linked Binaries for 64-bit Windows ”这种版本就可以了。 通过下载发现static版本的DLL都要大一些。

    下面是官方对static的解释:
    All the "static" packages contain either native or mixed-mode assembly binaries linked statically to the appropriate version of the Visual C++ runtime. Typically, these packages are used in cases where customer machines may not have the necessary version of the Visual C++ runtime installed and it cannot be installed due to limited privileges.

    大概就是上面的意思。

    "bundle"版是把System.Data.SQLite.dll和SQLite.Interop.dll打包一起的版本。
    相关链接:
    http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
    http://www.cnblogs.com/zhuweisky/p/3844089.html

    2018/11/7 补充

    升级版本后,发现本地运行没有问题,在服务器上会报“ 未能加载文件或程序集“System.Data.SQLite.dll”或它的某一个依赖项。找不到指定的模块
    文件名:“System.Data.SQLite.dll”。找不到指定的模块”。 原因如上面第四点所说,没有装vc++runtime,下载链接(Microsoft Visual C++ 2010 SP1 Redistributable Package (x86))[https://www.microsoft.com/en-us/download/details.aspx?id=8328]

    另外一个不需要安装的方式,就是把“msvcr100.dll”这个dll放到程序目录下,之前程序版本为啥不用呢? 因为在xulrunner目录下已经存在这个文件了。- -!!

  • 相关阅读:
    五:DockerFile制作Docker镜像
    六:Docker生产案例
    集群基础知识及haproxy负载均衡
    nfs服务部署记录
    haproxy 1.8.X版本编译安装教程
    Centos7.4安装kvm虚拟机
    什么是Docker
    Python—操作redis
    Python—redis
    机器学习之梯度下降法
  • 原文地址:https://www.cnblogs.com/yczz/p/4803118.html
Copyright © 2011-2022 走看看