Could not find the requested .Net Framework data provider. It cannot be installed. vs 2010 and SQL Server 2008 Express

In VS 2010, I use these steps to connect to a SQL Server database:

  • in the server explorer window, right-click on the data connections.
  • Click "Add Connection"
  • in the data source selection window, select SQL Server
  • click "Continue" button
  • The Add Connection window will appear.
  • in the text box of the server name, enter ". \ sqlexpress"
  • in the name or name of a database of type "Face"
  • Click "Test Connection" - I see a "successful test connection"
  • Finally click OK

In step 9, I see this error: "Could not find the requested .Net Framework data provider that could not be installed"

+7
source share
1 answer

The machine.config file has a self-running node. Removing this solved the problem.

machine.config is located in

\Windows\Microsoft.net\Framework\vXXXX\machine.config 

You can have many configuration files based on how many versions of the framework are installed, including 32 and 64-bit options.

 <system.data> <DbProviderFactories> <add name="Odbc Data Provider" invariant="System.Data.Odbc" ... /> <add name="OleDb Data Provider" invariant="System.Data.OleDb" ... /> <add name="OracleClient Data Provider" invariant="System.Data ... /> <add name="SqlClient Data Provider" invariant="System.Data ... /> <add name="IBM DB2 for i .NET Provider" invariant="IBM.Data ... /> <add name="Microsoft SQL Server Compact Data Provider" ... /> </DbProviderFactories> <DbProviderFactories/> //remove this one </system.data> 

Above the file, remove the <DbProviderFactories/> empty tag.

For More Reading Getting DbProviderFactory (ADO.NET)

Hope this helps you.

+9
source

All Articles