Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010 Add Connection dialogue not populating databases

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.

like image 494
Rick Avatar asked Feb 27 '23 10:02

Rick


1 Answers

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"

like image 124
divide_byzero Avatar answered Apr 28 '23 12:04

divide_byzero