今天想使用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 可能没有安装。解决方法[转载 ]

    原文:http://www.cnblogs.com/chenrui7/p/3592082.html 今天想使用CodeSimth生成一个sqlite数据库的模板.当添加添加数据库的时候发现: .Net ...

  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. C# ini文件操作【源码下载】

    介绍C#如何对ini文件进行读写操作,C#可以通过调用[kernel32.dll]文件中的 WritePrivateProfileString()和GetPrivateProfileString()函 ...

  2. 【探索】无形验证码 —— PoW 算力验证

    先来思考一个问题:如何写一个能消耗对方时间的程序? 消耗时间还不简单,休眠一下就可以了: Sleep(1000) 这确实消耗了时间,但并没有消耗 CPU.如果对方开了变速齿轮,这瞬间就能完成. 不过要 ...

  3. 6.DNS公司PC访问外网的设置 + 主DNS服务器和辅助DNS服务器的配置

    网站部署之~Windows Server | 本地部署 http://www.cnblogs.com/dunitian/p/4822808.html#iis DNS服务器部署不清楚的可以看上一篇:ht ...

  4. JavaScript正则表达式,你真的知道?

    一.前言 粗浅的编写正则表达式,是造成性能瓶颈的主要原因.如下: var reg1 = /(A+A+)+B/; var reg2 = /AA+B/; 上述两个正则表达式,匹配效果是一样的,但是,效率就 ...

  5. SDWebImage源码解读 之 NSData+ImageContentType

    第一篇 前言 从今天开始,我将开启一段源码解读的旅途了.在这里先暂时不透露具体解读的源码到底是哪些?因为也可能随着解读的进行会更改计划.但能够肯定的是,这一系列之中肯定会有Swift版本的代码. 说说 ...

  6. iOS微信第三方登录实现

    iOS微信第三方登录实现   一.接入微信第三方登录准备工作.移动应用微信登录是基于OAuth2.0协议标准构建的微信OAuth2.0授权登录系统.在进行微信OAuth2.0授权登录接入之前,在微信开 ...

  7. [原创]ubuntu16.04LTS使用细节

    如何给自己安装的应用创建桌面图标 拿php开发神器phpstorm为例,找到可执行文件所在路径. 这里是/home/haive/PhpStorm/bin/phpstorm.sh 打开dash,搜索&q ...

  8. python之类介绍

    python对象销毁(垃圾回收): 1>同Java语言一样,python使用了引用计数这一简单计数来追踪内存中的对象,也就是说,python内部记录着所有使用中的对象各有多少引用,一个内部跟踪变 ...

  9. CentOS7 安装Mono及Jexus

    CentOS7安装Mono及Juxes 1 安装Mono 1.1 安装yum-utils 因为安装要用到yum-config-manager,默认是没有安装的,所以要先安装yum-utils包.命令如 ...

  10. 开源一个WEB版本GEF,基于SVG的网页流程图框架

    8月开始断断续续的制作这个web gef,没有任何依赖,完全原生js开发,目前已经完成了雏形,基本上可以在项目里应用了. 下图展示的是demo1的效果,包括拖拽,生成连线,点击生成\取消墙体,整个de ...