无法加载 System.Data.SqlServerCe.Entity.dll (但它仍然存在)
我有一个 silverlight 应用程序。服务器应用程序在 App_Data 中有一个 SQL Server CE 4 .sdf,以及从中生成的 ADO.NET 模型。
如果我尝试添加 -> 新项目 -> 域服务类,我收到错误:
指定的架构无效。错误: Models.TasksDatabaseMode.ssdl(2,98):错误(0004):无法加载 System.Data.SqlServerCe.Entity.dll。重新安装 SQL Server Compact。
但是,我通过 NuGet 安装了 RIAServices.EntityFramework 和 EntityFramework.SqlServerCompact,它已成功将此 .dll 下载到 /packages,并且该文件已复制到 /bin 文件夹中。所以我不知道它在哪里寻找这个 .dll(如果不在那里的话)。
也许相关,我早些时候尝试让数据库先生成代码。但是,域上下文向导也失败了,但出现了有关索引越界的错误。使用手动编写的服务,构建因 MetadataWorkspace 错误而失败,我找不到任何有关该错误的信息。
I have a silverlight application. The server app has an SQL Server CE 4 .sdf in App_Data, and an ADO.NET model generated from it.
If I try to Add->New Item->Domain Service Class, I get the error:
Schema specified is not valid. Errors:
Models.TasksDatabaseMode.ssdl(2,98): error (0004): Could not load
System.Data.SqlServerCe.Entity.dll. Reinstall SQL Server Compact.
However, I installed RIAServices.EntityFramework and EntityFramework.SqlServerCompact via NuGet, which has successfully downloaded this .dll to /packages, and the file has been copied out into the /bin folder. So I have no idea where it is apparently looking for this .dll, if not there.
Perhaps related, I was earlier attempting to have the database generated code-first. However, the Domain Context Wizard was also failing, but with an error about an index being out of bounds. With a manually written service, the build was failing with a MetadataWorkspace error, about which I couldn't find any information.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是否直接安装运行时 (http://www.microsoft.com /en-us/download/details.aspx?id=17876) 解决问题吗?
另外,您使用什么版本的二进制文件?我怀疑您可能拥有私人版本(4.0.0.1)并且一代期望机器版本(4.0.0.0)
Does installing the runtime directly (http://www.microsoft.com/en-us/download/details.aspx?id=17876) fix the issue?
Also, what version of the binary are you using? I suspect that you may have the private version (4.0.0.1) and generation is expecting the machine version (4.0.0.0)