错误175:无法找到指定的数据存储提供程序 [英] Error 175: The specified data store provider cannot be found

查看:332
本文介绍了错误175:无法找到指定的数据存储提供程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用VS2010与 MySQL .NET Connector 。我以前工作的项目开始报告:

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


错误175:指定的数据存储提供程序找不到或无效。 p>

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

我不知道为什么,虽然在MS推荐修补程序VS之后,事情变得奇怪。

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

果然如果我将ADO.NET实体数据模型添加到项目中,当我选择从数据库生成时,生成.edmx文件的实体数据模型向导不会显示数据提供者。更糟糕的是,右键单击并尝试在现有.edmx文件上执行从数据库更新模型...将VS2010发送到只能使用任务管理器终止的对话框的死螺旋。

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.

我如何解决它:关闭VS2010。完全卸载MySQL连接器。重启。完全安装MySQL连接器。重启。重新启动VS2010。

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

突然间,我的数据提供者存在。我可以编译我的代码以及添加测试.edmx文件。向导会看到我的MySQL数据库,传递测试连接,并使用关系表构建对象模型。我可以像我想要的那样清理/重建。

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.

在这一点上,抛出一个异常,指出连接对象返回null,如果我重新编译没有代码更改,我再次收到错误175错误。泡沫,冲洗,重复。

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.

一些实验,显示连接字符串有效,并使用MySqlConnection对象,我可以访问数据库并滚动我的在这种状态下自己的工作查询

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.

这个问题似乎是数据存储提供程序以某种方式失去或踩踏,这正在影响能力通过EntityFrameworks来做事情。

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.  

更新 - 这个tidbit没有解决我的问题, VS2010更稳定:卸载.NET连接器后,我检查了控制面板的安装程序,并发现还安装了一个较旧的.NET连接器。我从控制面板卸载了一个,重新启动,然后安装了新的。 VS2010现在记住使用EntityFrameworks 的数据库提供者。显然,我安装了一个较新的MySQL连接器,认为它将卸载旧的MySQL连接器,而不是彼此跨越。

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.

现在我得到一个 System.ArgumentException 里面 System.Data.Entity.dll 表示略有不同的消息:

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

在配置中找不到指定的存储提供程序,或无效。
System.ArgumentException:无法找到请求的.Net框架数据提供程序。
可能没有安装。

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.

这发生在 System.Data.Common.DbProviderFactories .GetFactory(String providerInvariantName)方法。

修订注释 - 上述删除的原因是VS2010终于失去了设置。但是我可以从控制面板卸载.Net连接器,并重新安装连接器,而无需重新启动,并让我的数据提供者在环境中再次返回。这个问题的一部分感觉更像VS2010的错误,而不是.NET Connector的问题。

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.

推荐答案

更新 - 它似乎是一个环境/驱动程序的bug毕竟。

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

这篇关于错误175:无法找到指定的数据存储提供程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆