VS2012 中针对 .NET 4.0 的 System.Data.SQLite 设计时组件

5
我的应用程序的目标是.NET 4.0,因为我们计划继续支持Server 2003和Windows XP。我正在使用Visual Studio 2012,其中包括Entity Framework 4.4(在NuGet中列为5.0)和System.Data.SQLite的ADO.Net提供程序v1.0.85.0。
我遇到了问题,无法安装设计时组件,这些组件(1)适用于VS2012,并且(2)生成针对.NET 4.0的模型和代码。安装System.Data.SQLite包中的设计时组件以VS2012为前提条件,并在从现有数据库生成模型时导致Entity Framework错误:
“The data type 'bigint' is currently not supported for the target .NET Framework version; the column 'id' in table 'main.Message' was excluded.”
“The data type 'binary' is currently not supported for the target .NET Framework version; the column 'Message' in table 'main.Message' was excluded.”
目前的解决方法是使用VS2010更新Entity Framework模型,但这非常麻烦。是否有任何办法可以在VS2012上安装VS2010的设计时组件?或者,是否可以将VS2012的设计时组件配置为针对.NET 4.0?

1
.NET 4.5项目也有同样的问题。确实很烦人。 - AlexPi
1个回答

3

我在使用 .net 4.5 时遇到了同样的问题。此问题似乎与 sqlite-netFx45-setup-bundle-x86-2012-1.0.86.0 相关。但如果安装 sqlite-netFx45-setup-bundle-x86-2012-1.0.84.0 (而不是86),它能正常运行(至少在 .net 4.5 上)。


非常感谢。我今天下载了1.0.86.0版本,但是无法正常使用。在找到你提供的解决方案之前浪费了很多时间。 - lisp
下载地址:http://system.data.sqlite.org/downloads/1.0.84.0/sqlite-netFx45-setup-bundle-x86-2012-1.0.84.0.exe - Stef Heyenrath

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接