C# – Drag and Drop From Server Explorer to DataSet and DBML Designer NOT Working

cdatasetlinq-to-sqlvisual studio 2010xsd

I removed a table from a Linq to SQL DBML file via the designer this morning. After making several changes, I attempted to add the table back to the DBML designer surface and Visual Studio does nothing. When I try to drag the table from the list in Server Explorer, I do not get the arrow indicating that it is attempting a drag and drop operation. I have tried to drag several other tables from server explorer to the designer to no avail. I do not get an error.

I also tried updating a DataSet in another project that resides in the same solution and I get the same result. Visual Studio 2010 is not letting me drag tables from the server explorer to my designer surface for XSD or DBML files.

I have tried the following things so far

1) Close all windows in VS
2) Restart VS
3) Restart PC
4) Revert DBML to earlier versions

Any suggestions? This was working fine on Friday and I have not changed anything significant in the framework.

Just tried the following two things as well: Delete user option files and restart VS and create new project with DataSet and try to drag table from server explorer. Both failed.

Best Answer

Okay, I finally solved this problem.

The problem seems to be with the Visual Database Tools DLL.

This DLL file is installed by the VS 2010 installation, but during a SQL Server 2012 installation, it will be upgraded to the SQL 2012 version of the tools. Thereafter, uninstalling and reinstalling SQL or VS will not remove this newer DLL in order to allow the older version to be installed, and hence leave this annoying issue.

How I fixed it was I set up a clean virtual machine and installed VS 2010, then took this original DLL from my virtual machine and overwrote the DLL on my live machine. Simple as that.

I would assume though that deleting this DLL file and then doing a VS 2010 repair or uninstall/reinstall would also fix the problem.

The directory and file name of the DLL (on an X64 machine) is: C:\Program Files (x86)\Common Files\microsoft shared\Visual Database Tools\dsref80.dll

I hope this helps save someone else hours of pain!