Error 175: The data store provider supplied could not be located.

.net dataprovider entity-framework mysql visual-studio-2010

Question

I'm using VS2010 with the MySQL .NET Connector. My project that used to work started reporting:

Error 175: The specified data store provider cannot be found, or is not valid.

I don't know why, though things got weird after a MS recommended hotfix to VS.

Sure enough, if I go to add a test ADO.NET Entity Data Model to the project, the Entity Data Model Wizard that generates the .edmx file does not show the data provider when I select 'Generate from database'. Worse yet, right-clicking and attempting to do an 'Update Model from Database...' on an existing .edmx file sends VS2010 into a death spiral of dialog boxes that can only be terminated with Task Manager.

Here's how I fix it: Shutdown VS2010. Uninstall the MySQL Connector completely. Reboot. Install the MySQL Connector completely. Reboot. Restart VS2010.

Suddenly, my data provider exists. I can compile my code. As well as add test .edmx files. The wizard sees my MySQL database, passes the test connection, and builds object models with my relational tables. I can clean/rebuild as much as I want.

All's good until I run the app. My "fix" doesn't stick.

At that point an exception is thrown stating that the connection object is returning null, and if I recompile with no code changes, I get the Error 175 error again. Lather, rinse, repeat.

Some experiments based off of this StackOverflow answer, show that the Connection String is valid, and using the MySqlConnection object, I can access the database and roll my own working queries in this state.

The problem seems to be that the data store provider is somehow getting lost or stepped on, and this is impacting the ability to do things through EntityFrameworks.

I'm looking for some advice on where to look for these being stored, if anyone has run across something similar, and if there's any useful suggestions or ideas you think I might try.  

UPDATE -- While this tidbit did not solve my problem, it did make VS2010 more stable: Immediately after uninstalling of the .NET Connector, I checked under Control Panel's installed programs and found there was an older .NET Connector installed as well. I uninstalled that one from the control panel, rebooted, and then installed the new one. VS2010 now remembers the database provider for working with EntityFrameworks. Apparently I installed a newer MySQL Connector thinking it would uninstall the old one, instead they step all over each other.

Now I'm getting a System.ArgumentException inside System.Data.Entity.dll stating the slightly different message:

The specified store provider cannot be found in the configuration, or is not valid. System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.

This happens at the System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) method.

REVISION NOTE -- The reason for the strike-outs above is that VS2010 eventually did lose the settings again. But I was able to uninstall the .Net Connector from the control panel and reinstall the connector again, without a reboot, and got my data provider back again in the environment. This part of the problem is feeling more like a VS2010 bug than a .NET Connector issue.

1
21
5/23/2017 11:53:24 AM

Accepted Answer

The problem went away after significant updates -- it appeared it was an environment/driver bug after all.

1
7/19/2011 2:16:50 PM

Popular Answer

I had this same error after reinstalling windows, and forgetting to add the provider for SQlite.
It's here, and even though it doesn't mention it, it supports VS 2010 fully.



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow