SQLite的和实体框架 [英] SQLite and Entity Framework

查看:332
本文介绍了SQLite的和实体框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用SQLite数据库与最新的实体框架。我已经为.NET Framework 4.0中从这里安装的SQLite提供86:的 http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki

我成功地加入SQLite作为通过使用服务器资源管理器在Visual Studio 2012年之后新的数据源,我增加了新的ADO.NET实体模型,并试图从我简单的SQLite数据库添加表。出于某种原因,不能添加这些表和错误日志说以下内容:

  
    

数据类型LONGCHAR目前不支持目标.NET Framework版本; >>在表中的列'名称''main.Person被排除在外。

  

我不明白为什么它试图转换SQLite的文本类型LONGCHAR和失败。谁能帮我解决这个问题?

解决方案

我刚刚得到这个问题的设置我的开发环境,使用SQLLITE和ADO在工作和修复很简单的一个项目后的今天。版本1.0.85.0被打破和版本1.0.84.0作品。

32位: <一href="http://system.data.sqlite.org/downloads/1.0.84.0/sqlite-netFx40-setup-bundle-x86-2010-1.0.84.0.exe" rel="nofollow">http://system.data.sqlite.org/downloads/1.0.84.0/sqlite-netFx40-setup-bundle-x86-2010-1.0.84.0.exe

64位: <一href="http://system.data.sqlite.org/downloads/1.0.84.0/sqlite-netFx40-setup-bundle-x86-2010-1.0.84.0.exe" rel="nofollow">http://system.data.sqlite.org/downloads/1.0.84.0/sqlite-netFx40-setup-bundle-x86-2010-1.0.84.0.exe

卸载确认要删除程序文件的每个安装以及当您重新安装告诉安装程序来重建GAC。应工作,这是我的,我的boses构建机器唯一的区别,该网站需要列出previous版本更好。

I'm trying to use SQLITE database with latest Entity Framework. I've installed SQLite provider x86 for .NET Framework 4.0 from here: http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki.

I succesfully added SQLITE as new data source by using server explorer in Visual Studio 2012. Then, I added new ADO.NET Entity Model and tried to add tables from my simple sqlite database. For some reason these tables can't be added and error log says following:

The data type 'longchar' is currently not supported for the target .NET Framework version; >>the column 'Name' in table 'main.Person' was excluded.

I dont understand why it's trying to convert SQLite TEXT type to longchar and fails. Can anyone help me with this problem?

解决方案

I was just getting this issue today after setting up my development environment for a project that uses SQLLITE and ADO at work and the fix was simple. Version 1.0.85.0 is broken and version 1.0.84.0 works.

32 BIT: http://system.data.sqlite.org/downloads/1.0.84.0/sqlite-netFx40-setup-bundle-x86-2010-1.0.84.0.exe

64 BIT: http://system.data.sqlite.org/downloads/1.0.84.0/sqlite-netFx40-setup-bundle-x86-2010-1.0.84.0.exe

Uninstall make sure to delete the program files for each install and also when you re-install tell the installer to rebuild your GAC. Should work that was the only difference between my and my boses build machine, that website needs to list previous revisions better.

这篇关于SQLite的和实体框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆