“无法解析配置文件...”当我将EF6添加到一个解决方案中 [英] "Could not parse configuration file..." when I add EF6 to a solution

查看:235
本文介绍了“无法解析配置文件...”当我将EF6添加到一个解决方案中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将EF6添加到解决方案中时,我收到错误。我认为当我从数据库更新模型时也会发生这种情况。在添加EF后,输出窗口出现错误:无法解析配置文件,错误信息为:'库未注册(HRESULT异常:0x8002801D(TYPE_E_LIBNOTREGISTERED))'尝试手动编辑文件

I get an error when I add EF6 to a solution. I think it also happens when I update the model from the database. The error shows up in the Output window right after I add EF: "Could not parse the configuration file. The error message is: 'Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))' Try editing the file manually and then saving it."

错误对应用程序(或EF的功能)的编译或运行似乎没有任何影响。不过,像这样的技术一直是数据管理策略的关键,像这样的错误总是令人不安。

The "error" doesn't seem to have any influence on the compiling or running of the application (or the function of EF). However, an error like this is always disturbing when it's with the technology that is supposed to be the linchpin of your data management strategy.

推荐答案

我相信我已经发现了这个问题。我可以在我的开发机器和一些其他的开发机器上重命名。

I believe that I have discovered the problem. I can repro it on my development machine and a couple of other dev machines.

我正在使用VS。我使用的解决方案包括第二个项目,一个设置/部署项目,InstallShield限量版项目。如果我删除该项目,错误就会消失。

I am using VS 2013. The solution that I was using included a second project, a setup/deployment project, InstallShield Limited Edition Project. If I remove that project, the errors go away.

如果我创建一个新项目,通过Nuget添加EF,将EF模型添加到解决方案中,然后添加此设置项目我可以重现错误。如果您自己尝试,只需记住您需要打开VS和解决方案,在设计器中打开模型,单击设计表面空白处的任何位置,错误将弹出在输出中。细节在之前的帖子中。

If I create a new project, add EF via Nuget, add an EF model to the solution and then add this setup project I can repro the error. If you try it yourself, just remember you need to open VS and the solution, open the model in the designer, click anywhere in the whitespace of the design surface, the error should pop up in the Output. The details are up there in an earlier post.

这篇关于“无法解析配置文件...”当我将EF6添加到一个解决方案中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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