New connection fails while adding a new data source dialog

Problem

If I have Visual Studio 2010, Service Pack 1 installed, and I go to Data, Add New Data Source and click Database, it will open the "Choose your data connection" wizard page.

On this page, if I have an existing connection configured, I can select it and add this data source to my project, no problems and problems.

On the other hand, if I click New Connection ... it just explodes, the wizard closes, as if it hadn’t done anything. Now keep in mind that Visual Studio does not close and there are no exceptions, errors or warnings, the dialog just disappears.

Unsuccessful attempts to solve the problem

I checked simple things using a debugger and a valid machine configuration file, not sure what else I could lose.

  • Using a debugger

    I tried running a second copy of Visual Studio, as I did, and attaching the debugger to the process with all the exceptions checked in my debug menu and still nothing.

  • Validation of machine.config file valid

    I backed up the machine.config file and used a different file working with machine.config and I still have problems.

    Since then I have returned to my own machine.config file.

    I suspect that the machine.config problem may be a problem, but I thought the work should work if I do not miss one of the registered providers? I don’t know enough about how this wizard nevertheless works behind the scenes, or which sections / lines The machine.config file precisely controls the wizard.

  • Removing all third-party database providers

    I recently tried uninstalling Oracle, SQLite, the SQL Server Compact Edition beta, and MySQL providers in the hope that one of them would set up a registry entry or a configuration entry that adversely affected my ability to create new connections, and the error still occurs.

  • Reinstall Visual Studio

    I reinstalled Visual Studio, performed a complete uninstall and reinstalled, no extensions or anything, and the problem exists, definitely convinced of its configuration error, I could use the expert opinion on who knows more about the scene configuration for this dialog.

Any help in solving the problem would be greatly appreciated.

+6
source share
4 answers

I have the same problem. Delete all entries in the viewwr and work.

Start β†’ Start

Enter "eventvwr"

Choose application

Choose Action> Clear All Events from the menu.

Save or not, as you want, back up events. Do the same with System

+3
source

Visual Studio 2012 solution.

Close the visual studio.

Open the event viewer, go to the application log and look for errors with the devenv source.

My said

 The following information was included with the event: .NET Framework Data Provider for MySQL: An unexpected error occurred in the data provider. 

Then I opened the registry editor and went to:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config\DataProviders\

And deleted the key that was transferred to the wrong data provider

{c6882346-e592-4da5-80ba-d2eadcda0359}

(default) = .NET Framework Data Provider for MySQL

+6
source
  • Try using the Explorer window to add your connection.

  • Try to determine the connection string from the Settings.settings file

  • Try moving / deleting all * .datasource files from the project / solution before adding the connection

  • Try creating a new empty solution and see if the problem is a non-indepentent solution.

  • Try to find out which keys and registry files are used by Visual Studio if you encounter a problem with Sysinternals Process Monitor

+2
source

I had the same problem today.

Solved it by removing the tag in the machine.config file:

 **32-bit** %windir%\Microsoft.NET\Framework\[version]\config\machine.config **64-bit** %windir%\Microsoft.NET\Framework64\[version]\config\machine.config Tag to remove: <DbProviderFactories/> 
+1
source

Source: https://habr.com/ru/post/902039/


All Articles