Error 175: The specified data store provider cannot be found
Asked Answered
I

5

21

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.

Idempotent answered 14/12, 2010 at 22:3 Comment(6)
Decided to change the name of the connection and that resulted in a different error, "The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or both." So I set it back, proving that I am, indeed, using the correct app.config connection string, which as mentioned before does connect to the database.Idempotent
Conducted another experiment in VS2010 directly: Went to Tools / Connect to Database..., pressed Change..., selected MySQL Database and from the drop down below ".NET Framework Data Provider for MySQL", and pressed OK. Gave a server name of localhost, username of root, and the password to MySQL. Pressing Test Connection reports "Test connection succeeded." and I press OK. Meanwhile, the Database name drop down remains disabled (although I know I have a database), and if I press OK I get a pop up of "Unable to find the requested .Net Framework Data Provider. It may not be installed."Idempotent
Total uninstall of everything MySQL -- database, workbench, connector. Followed with a fresh reinstall of the latest and greatest versions. No change. Error 175 still appears. I am greatly suspect of a configuration issue, but not sure where to look.Idempotent
This might be related -- adding a .edmx causes machine.config to get its MySQL entry zapped: social.msdn.microsoft.com/Forums/en-US/wcf/thread/…Idempotent
Does using the MySQL 6.3 Connector for VS2010 require the use of .NET 4 only, see the bottom of dev.mysql.com/doc/refman/5.1/en/connector-net-versions.htmlIdempotent
New VS2010 integration issues suggest so -- dev.mysql.com/doc/refman/5.1/en/…Idempotent
I
1

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

Idempotent answered 19/7, 2011 at 14:16 Comment(0)
M
4

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.

Menstruum answered 28/7, 2011 at 4:28 Comment(0)
I
1

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

Idempotent answered 19/7, 2011 at 14:16 Comment(0)
E
1

I just restarted my VS2010,and the error just went away!!

Evania answered 4/3, 2012 at 16:25 Comment(0)
A
0

Based on some of the comments on the net this could be related to the provider not being in the GAC.

It could also be that an old version is the GAC.

Check what is in the GAC, add the dll to the GAC if it is missing. Restart the machine after any changes in the GAC.

Arluene answered 2/2, 2011 at 19:57 Comment(0)
B
0

I came across this error recently and after much restarting / reinstalling it turned out the issue was actually that the 'connector' user had insufficient privledges on a view.

Bewitch answered 10/12, 2012 at 15:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.