MetadataException:无法加载指定的元数据资源

泄露秘密 提交于 2020-08-12 05:13:21

问题:

All of a sudden I keep getting a MetadataException on instantiating my generated ObjectContext class. 突然间,我在实例化生成的ObjectContext类时不断收到MetadataException The connection string in App.Config looks correct - hasn't changed since last it worked - and I've tried regenerating a new model (edmx-file) from the underlying database with no change. App.Config中的连接字符串看起来是正确的 - 自上次工作以来没有改变 - 我尝试从底层数据库重新生成一个新模型(edmx文件)而没有任何变化。

Anyone have any ideas? 有人有主意吗?

Further details: I haven't changed any properties, I haven't changed the name of any output assemblies, I haven't tried to embed the EDMX in the assembly. 更多细节:我没有更改任何属性,我没有更改任何输出程序集的名称,我没有尝试在程序集中嵌入EDMX。 I've merely waited 10 hours from leaving work until I got back. 我离开工作只等了10个小时,直到我回来。 And then it wasn't working anymore. 然后它不再工作了。

I've tried recreating the EDMX. 我试过重新创建EDMX。 I've tried recreating the project. 我试过重新创建这个项目。 I've even tried recreating the database, from scratch. 我甚至尝试从头开始重新创建数据库。 No luck, whatsoever. 没有运气,无论如何。


解决方案:

参考一: https://stackoom.com/question/2tKd/MetadataException-无法加载指定的元数据资源
参考二: https://oldbug.net/q/2tKd/MetadataException-Unable-to-load-the-specified-metadata-resource
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!