Options

Sql Compare, Windows 7 and localdb

threaxthreax Posts: 2
edited July 31, 2014 3:07PM in SQL Compare Previous Versions
I've been tearing my hair out the last couple hours trying to get Sql Compare and Sql Data Compare to connect to a localdb instance on a Windows 7 machine. I kept getting connection errors that the instance could not be found. I do not have any of these problems on my normal Windows 8 development machine.

It turns out that these programs are set to run on .net 2.0 by default if it is present, which does not support the (localdb)\v11.0 (for 2012) or (localdb)\MSSQLLocalDB (2014) style connection strings.

To fix this problem go to your Sql Compare installation directory (likely C:\Program Files (x86)\Red Gate\SQL Compare 10) and find all the .exe.config files. You must modify the startup section to have .net 4.0 as the first entry.

So change:
<startup>
  <supportedRuntime version="v2.0.50727"/>
  <supportedRuntime version="v4.0"/>
</startup>

to
<startup>
  <supportedRuntime version="v4.0"/>
  <supportedRuntime version="v2.0.50727"/>
</startup>

in each of those files and you should be able to connect to localdb instances. This is likely a problem for anything that has .net 2.0 installed on it including Windows 8, which does not have it by default. I apologize if this is basic information or already present in the forum, but my Google searching was not turning up any results and I kind of stumbled upon this solution. I'm posting this here in case it helps someone else in the future. This also fixed my Sql Data Compare instance and will likely help other Sql Toolkit programs as well.
Sign In or Register to comment.