February 09, 2014

The provider did not return a providermanifest instance

Errors:
- EntityDataSource error ...
- Error in Visual Studio 2013 and EntityDataSource
- EntityDataSource have error "the provider did not return a providermanifest instance"
- How to Fix "The provider did not return a ProviderManifest instance ...

Full 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.


Solution:
Open the EDMX file and change ProviderManifestToken="2012" to ProviderManifestToken="2008"

Other Solutions (not useful for me):
1- I know this is a ridiculous solution but i think that the star (*) is not working in connection string field of Web.config :-( you can change it with project name as a project namespace reference
Before: <add name="TestEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl blah blah
After: <add name="TestEntities" connectionString="metadata=res://PROJECTNAME/Model1.csdl|res://PROJECTNAME/Model1.ssdl blah blah

2- Go to Run%temp% and empty the temp folder
3- Set integrated security=False in connection string field of Web.config

13 comments:

Anonymous said...

Thanks! I have been looking for the last two days to resolve this issue and no other suggestions worked. This did the trick!

AmirMehdi KhademAstaneh said...

YW, This problem waste my days and i'm really happy you pass this obstacle :-)

Anonymous said...

Fantastic, thank you so much!

Matt said...

Thanks a lot! ProviderManifestToken=2008 did it for me.

Anonymous said...

Thanks! Changing it to 2008 worked for me

George Botros said...

Big Kiss
That was about to kill me

Anonymous said...

Thanks. Changing the * by the project name helped.

Unknown said...

Thank you for posting the issue...2008 worked for me

Unknown said...

Thank you for posting the issue...2008 worked for me

Anonymous said...

Awesome!! Worked great for me!

Anonymous said...

thanks

Martin Dodd said...

I too have have had this problem, but my solution was different again. I originally started with EF6, but I realized quickly that scaffolding was not supported. Instead, uninstall EF6 and installed EF5 (supports scaffolding) however I was faced with the:
THe provider did not return a provider manifest instance
The issue was not the connectionstring, but a table that was created in EF6 called MigrationHistory table in the SQL Server Database. Once I deleted the table the MVC application started working again. I hope this helps someone.

Anonymous said...

This did the trick, thank you. I have been working my way through an older book and this solved my problem.