原文:http://www.cnblogs.com/chenrui7/p/3592082.html

今天想使用CodeSimth生成一个sqlite数据库的模板。当添加添加数据库的时候发现:

.Net Framework Data Provider 可能没有安装。

下面找到官方的文档说明:

SQLite Schema Provider

If you are trying to use the SQLite Schema Provider you may encounter the error message: 'The System.Data.SQLite library is not installed on this computer'. This error can occur for two reasons:

  1. The System.Data.SQLite hasn't been installed on your machine.
  2. The System.Data.SQLite hasn't been properly configured.

Installing System.Data.SQLite

Icon

CodeSmith Generator is compiled as AnyCPU. This means that Generator will run as a 64bit process when you launch Generator outside of Visual Studio. If you are generating from within Visual Studio (32bit process), then CodeSmith Generator libraries will run as a 32bit process.

This is very important to understand as it determines which Schema Provider dependencies are resolved at run-time.

The first step is to ensure that you download and install the latest .NET Framework 4.0 version of  System.Data.SQLite.

Icon

If you are running a 64bit version of windows, please install both the 32bit and 64bit versions.
Icon

You can skip the following configuration steps if you install the legacy version of System.Data.SQLite hereThe older version configures itself by adding entries into your machine.config. 

Configuring System.Data.SQLite

The SQLite Schema Provider doesn't require a specific version of the SQLite managed libraries. This is because it uses DbProviderFactories when interacting with SQLite. One must update all .NET Framework 4.0 machine.config's and add the SQLite provider to the DbProviderFactories element:

<system.data>
  <DbProviderFactories>
    <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
  </DbProviderFactories>
</system.data>

The .NET Framework 4.0 machine.config's can be found here:

  • %windir%\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
  • %windir%\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
Next, you will need to copy the 64bit or 32bit SQLite assemblies that were installed via the System.Data.SQLite installer to CodeSmith Generators bin folder. This bin folder can be found in the location that you installed CodeSmith Generator to.
 

看不懂的话,按照下面的方法做:

1、下载System.Data.SQLite驱动;注意:根据自己的CPU选择是32位还是64位的驱动。建议选择4.0平台以上的。我的是:sqlite-netFx40-setup-bundle-x64-2010-1.0.91.0.exe ;

2、安装完成后打开C:\Program Files\System.Data.SQLite\2010\GAC把里面的两个dll复制到CodeSimth安装目录下的bin文件夹;

3、配置

  根据自己的CPU平台打开下面路径,【可能需要修改一下文件写入的安全性,设置为Everyone就可以了,否则保存不了】

  • %windir%\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
  • %windir%\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config (我选择的是这个)
  • 找到<system.data>节点添加下面的内容。
<system.data>
  <DbProviderFactories>
    <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
  </DbProviderFactories>
</system.data>

4、重启CodeSimth就可以了。

CodeSimth - .Net Framework Data Provider 可能没有安装。解决方法[转载 ]的更多相关文章

  1. CodeSimth - .Net Framework Data Provider 可能没有安装。解决方法

    今天想使用CodeSimth生成一个sqlite数据库的模板.当添加添加数据库的时候发现: .Net Framework Data Provider 可能没有安装. 下面找到官方的文档说明: SQLi ...

  2. CodeSimth - .Net Framework Data Provider 可能没有安装

    使用CodeSimth 连接SQLite数据库库 提示错误 codesmith 6以上的版本,说是支持sqlite生成,也有对应的sqliteprovider.dll,但是使用时却说Test fail ...

  3. Data Provider 中没有.net framework Data provider for Mysql 的解决方法

    近来做的一个项目中,数据库用的是 MySql, 而在项目使用 Entity Data Model 来做数据服务层,可是在项目中添加 Data Entty Model 时,一般我们都会选择从数据库中直接 ...

  4. .Net Framework Data Provider可能没有安装

    方法一.下载SQL Server Compact 4.0 安装后就可以解决.下载地址是: http://www.microsoft.com/downloads/zh-cn/details.aspx?f ...

  5. 错误:找不到请求的 .Net Framework Data Provider。可能没有安装.

    一.错误描述 今天在帮同事Debug的时候遇到这个问题,错误信息提示到是Data Provider的问题,首先我们看下环境. 数据库版本:Oracle 11.2.0.4.0 64位 数据库服务器:li ...

  6. 找不到请求的 .Net Framework Data Provider。可能没有安装.

    学习中遇到的问题: 找不到请求的 .Net Framework Data Provider.可能没有安装. 找到的解决方法 解决方法: 安装Microsoft SQL Server Compact 4 ...

  7. Sqlite数据库 找不到请求的 .Net Framework Data Provider。可能没有安装

      解决方法 在web.config里面添加 <system.data> <DbProviderFactories> <remove invariant="Sy ...

  8. codesmith连接Mysql提示“找不到请求的 .Net Framework Data Provider。可能没有安装。"

    1,首先需要将MySql.Data.dll复制到codesmith安装目录下bin文件夹下,注意dll的版本 2,其次因为codesmith7采用的是.net4.0的配置文件,(64位系统)找到C:\ ...

  9. 解决“找不到请求的 .Net Framework Data Provider。可能没有安装.”错误

    问题: 这几天在装.NET 的开发环境,在装好VS2013和Oracle 11g之后,做了一个测试项目,运行调试没问题 但是涉及到数据库相关操作,如新建数据集.连接数据库等在调试的时候则会出现如下错误 ...

随机推荐

  1. css3中的 @Keyframes

    一.介绍 keyframes被称为关键帧,其类似于Flash中的关键帧.在CSS3中其主要以“@keyframes”开头,后面跟着是动画名称加上一对花括号“{…}”,括号中是一些不同时间段样式规则. ...

  2. 自己写js库,怎么支持AMD

    最近我打算把之前做项目写的一些工具集成到一个js库中,但是库既要在普通环境正常运行,又要在AMD环境下不暴露全局变量.一时间挺头疼的.随即我参考了一些现在流行的库的源码.学着写了一下,感觉还不错. 既 ...

  3. jQuery实现轮播切换以及将其封装成插件(2)

    在上一篇博文中,我们完成了一个简单的轮播切换.它的功能比较简单,仅仅能定时切换图片. 但是有没有这样一种情况.当我们特意的想看某一个轮播显示项时不希望等轮播一圈才能等到,希望通过图上的一些元素,触发某 ...

  4. C# 复合赋值操作符

    前面讲过如何使用算术操作符来创建新值.例如,以下语句使用操作符+来创建比变量answer大42的一个值,新值将写入控制台: Console.WriteLine(answer + 42); 前面还讲过如 ...

  5. 1.Mysql集群------Docker下的Mysql主从复制

    前言: 实话说,我想做的是Mysql集群架构. 我的计划是: 1.实现Docker下的Mysql主从复制 2.实现MyCat基于Mysql的读写分离 3.实现MyCat的分库分表 4.实现pxc集群 ...

  6. 基于mybatis设计简单信息管理系统1

    驼峰式命名法 骆驼式命名法就是当变量名或函数名是由一个或多个单词连结在一起,而构成的唯一识别字时,第一个单词以小写字母开始:第二个单词的首字母大写或每一个单词的首字母都采用大写字母,例如:myFirs ...

  7. JQuery实现子级选择器

    效果图如下: HTML代码如下: <!DOCTYPE html> <html lang="en"> <head> <meta charse ...

  8. 在haoodp-2.7.3 HA的基础上安装Hbase HA

    前提安装好hadoop基于QJM的高可用 node1 HMaster node2 HMaster.HRegionServer node3 HRegionServer node4 HRegionServ ...

  9. tar工具(打包,压缩)

    tar工具(打包,压缩)========================= tar打包工具 -c:表示建立一个tar包或者压缩文件包-x:表示解包或者解压缩-v:表示可视化-f: 后面跟文件名(即-f ...

  10. 一次完整的http请求处理过程

    一次完整的HTTP请求需要的7个步骤 HTTP通信机制是在一次完整的HTTP通信过程中,Web浏览器与Web服务器之间将完成下列7个步骤: 1:建立TCP连接 在HTTP工作开始之前,Web浏览器首先 ...