Visual Studio 2010 hangs up when opening a .sql file

Visual Studio-2010Visual Studio

Visual Studio-2010 Problem Overview


I launch VS 2010, and simply open any ordinary (or blank) .sql file and it shows up incorrectly drawn inside the IDE. It draws the document tab, but nothing else. If I type on the keyboard, VS locks up. This only appears to be a problem with files that have the extension ".sql" and has no bearing on the actual content. I also noticed that in the Solution Explorer, those .sql files show the icon that is the same one associated with .js files.

Visual Studio-2010 Solutions


Solution 1 - Visual Studio-2010

Problem solved. I was able to resolve the problem by running the DACProjectSystemSetup_enu.msi installer found on the VS2010-SP1 ISO under the root directory. You might also need to re-install DACFramework_enu.msi and TSqlLanguageService_enu.msi.

I believe the problem was created as a result of installing SQL Server 2008 R2 after installing VS2010.

Solution 2 - Visual Studio-2010

I was able to fix the issue by:

  1. Downloading the SP1 DVD ISO from here.

  2. Executing DACProjectSystemSetup_enu.msi from the root of the ISO.

These 2 simple steps resolved it.

Solution 3 - Visual Studio-2010

Copy and Install below MSIs from VS 2010 Setup folder:

  • DACFramework_enu.msi
  • DACProjectSystemSetup_enu.msi
  • TSqlLanguageService_enu.msi

Solution 4 - Visual Studio-2010

microsoft.visualstudio.editor.implementation clr20r3 I got mine working with the following steps

  1. Navigate to C:\Users\USERNAME\AppData\Local\Microsoft\VisualStudio\12.0\
  2. Rename ComponentModelCache directory to 1ComponentModelCache1 and the folder will be recreated later
  3. Retry

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionLee GrissomView Question on Stackoverflow
Solution 1 - Visual Studio-2010Lee GrissomView Answer on Stackoverflow
Solution 2 - Visual Studio-2010Mauricio FeijoView Answer on Stackoverflow
Solution 3 - Visual Studio-2010satya 85View Answer on Stackoverflow
Solution 4 - Visual Studio-2010Omgee CaresView Answer on Stackoverflow