开发者

Visual Studio 2010 Add Connection dialogue not populating databases

开发者 https://www.devze.com 2023-01-12 11:40 出处:网络
I\'ve installed Visual Studio 2010 and SQL Server 2008 (on 64 bit Windows 7). When I attempt to add a data source using the Add Connection dialogue, the dialogue is able to populate the servers, but w

I've installed Visual Studio 2010 and SQL Server 2008 (on 64 bit Windows 7). When I attempt to add a data source using the Add Connection dialogue, the dialogue is able to populate the servers, but when a server is chosen it is not able to populate the databases.

When a database name is manually entered and OK is clicked, the following error is received: "Unable to find the requested .Net Framework Data Provider. It may not be installed."

Things I've tried:

  • Following the same process in VS 2008 works successfully.
  • I've uninstalled and reinstalled VS 2010 and SQL Server 2008 (and install SQL Server 2008 R2) to no avail
  • I have manually commented out the line in the machine.config(s) that associate the Compact Version of SQL Server (per forums that I've found relating to a similar issue in VS 2008). No avail.
  • I have created a Virtual Machine and only installed VS 2010开发者_开发知识库 (on the same version of Windows 7). This works, but I'd prefer to not have to work in a VM.
  • An application that already has a datasource will build successfully and run as expected, but an error will be returned when attempting to update LINQ .edmx file from the datasource.

Anybody else ever experience this/have a solution that has worked? Thank you for your help.


The only thing to fix this problem for me was to go into both machine configs listed below and remove the data providers. Basically I went into the machine configs and changed this.

<system.data>
    <DbProviderFactories>
        <add name="IBM DB2 for i5/OS .NET Provider" invariant="IBM.Data.DB2.iSeries" description=".NET Framework Data Provider for i5/OS" type="IBM.Data.DB2.iSeries.iDB2Factory, IBM.Data.DB2.iSeries, Version=12.0.0.0, Culture=neutral, PublicKeyToken=9cdb2ebfb1f93a26"/>
        <add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/></DbProviderFactories>
    <DbProviderFactories/>
</system.data>

to this

<system.data>
    <DbProviderFactories></DbProviderFactories>
</system.data>

I know this post is old but I am hoping this reply will save some one a lot of time. Also you can remove the <DbProviderFactories/> tag and it will fix it too.

Machine Config locations. "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config"


I managed to solve the problem by moving the machine.config file from "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config" and "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config" to another location (as a backup) and then ran a repair on the .NET Framework 4 Client Profile. This rebuilt the machine.config file and now everything works fine.


I had the same exact issue - I un-installed dot net 4 on my pc and re-installed it - And it resolved this issue.


I was able to rememdy this issue, after much head scratching, by browsing to "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config" then deleting machine.config and rename machine.config.default to machine.config.

Steps: 1.) Browse to "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config" 2.) Backup, then delete machine.config 3.) Create a copy of machine.config.default 4.) Rename Copy of machine.config to machine.config


After much thrashing of teeth and much searching online, I found an Microsoft response that recognized the problem as something they could not recreate. They suggested that the person having the problem re-image their machine and start again. So it sounds like a few others may have run across this problem, but not enough to have an answer to it (or anyone who seems to have successfully fixed it without a re-image)

I have followed this suggestion after saving off all necessary data off to another PC. The second installation went well and we're up and running.


It seems to be an issue with IBM iSeries Access editing the machine.config file. If you edit the config file and remove the additional node (around line 152) you should be able to add connections again. Here's the MS bug report link:

https://connect.microsoft.com/VisualStudio/feedback/details/652192/visual-studio-2010-add-connection-fails#tabs

Thanks to Rick for mentioning the bug report!

0

精彩评论

暂无评论...
验证码 换一张
取 消