简体   繁体   English

缺少SQL Server Compact 4.0提供程序

[英]Sql Server Compact 4.0 provider missing

I have been looking into using SQL Compact Editition 4.0 in a .NET 4.0 solution and I was doing fine until I decided to rename a bunch of projects and their namespaces. 我一直在研究在.NET 4.0解决方案中使用SQL Compact Editition 4.0,在我决定重命名一堆项目及其名称空间之前,我一直做得很好。 Since then, I lost the ability generate an EDMX model from an SDF file. 从那时起,我失去了从SDF文件生成EDMX模型的能力。

Usually, I'd add the EDMX as new item in my project, then "Generate from database" and from there I could create the SDF file using SQL Server Compact 4.0 provider. 通常,我将EDMX添加为项目中的新项,然后“从数据库生成”,然后从那里可以使用SQL Server Compact 4.0提供程序创建SDF文件。 Of course this would generate an empty model but the provider was nonetheless available. 当然,这将生成一个空模型,但是提供程序仍然可用。

Now, all I get it: 现在,我得到的一切:

没有CE!

I've tried uninstalling/installing SQL CE and its SP1, Visual Studio SQL CE 4.0 Tools SP1, no go. 我试过卸载/安装SQL CE及其SP1,Visual Studio SQL CE 4.0工具SP1,不行。

Do I need to reformat my system drive ? 我需要重新格式化系统驱动器吗?

The 4.0 Provider is only available in Web type Projects, not class library and desktop Projects. 4.0提供程序仅在Web类型的项目中可用,而在类库和桌面项目中不可用。 Workaround is to add a web type project and the move the .edmx afterwards (and the corresponing connection string in app.config/web.config) 解决方法是添加一个Web类型项目,然后再移动.edmx(以及app.config / web.config中相应的连接字符串)

Ended up uninstalling VS2010 and everything related to development on my workstation and installed this VS2010 addin: http://sqlcetoolbox.codeplex.com/ 最终卸载了VS2010以及与我的工作站上的开发相关的所有东西,并安装了此VS2010插件: http : //sqlcetoolbox.codeplex.com/

Allows you to export an EDMX model into project type of any kind. 允许您将EDMX模型导出为任何类型的项目类型。 :) :)

(Which you seem to be the author of, realized that after posting this, lol) (您似乎是谁的作者,意识到在发布此信息后,大声笑)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM