The provider did not return a ProviderManifest instance

故事扮演 提交于 2019-12-11 12:33:21

问题


when I want to configure my Datasource (EntityDataSource1) and assign the connectionString that is generated automatically by entity data model to it. I get the error:

"The metadata specified in the connection string could not be loaded. Consider rebuilding the web project to build assemblies that may contain metadata. The following error(s) occurred: The provider did not return a ProviderManifest instance".

I read so many suggestions like http://blogs.teamb.com/craigstuntz/2010/08/13/38628/ They all suggest to replace * with assembly-name in connection string. for example :

<connectionStrings>
    <add name="MyEntities" connectionString="metadata=
            res://*/Model.csdl|
            res://*/Model.ssdl|
            res://*/Model.msl;provider= <!-- ... -->

replace with

<connectionStrings>
    <add name="MyEntities" connectionString="metadata=
            res://Simple Mvc.Data.dll/Model.csdl|
            res://Simple Mvc.Data.dll/Model.ssdl|
            res://Simple Mvc.Data.dll/Model.msl;provider= <!-- ... -->

my question is. Where can I find name of assembly? I installed .Net Reflector as well but i could not find the correct assembly name for entity data model.


回答1:


I found a solution for this error.

I keep my connectionString as same as before (I mean with *) then I opened the EDMX file with notepad and change ProviderManifestToken="2012" to ProviderManifestToken="2008" That's it ;)

Now I can configure the EntityDataSourc with existing connectionString



来源:https://stackoverflow.com/questions/25990953/the-provider-did-not-return-a-providermanifest-instance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!