Answered Unable to open SQL files in VS2010

  • Friday, June 18, 2010 2:10 AM
     
      Has Code

    After a full reinstall of SQL Server 2008, I am no longer able to open SQL files in Visual Studio.  I ran a full repair on Visual Studio to no effect. 

     

    The error is

    Attempt by method
    'Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactoryBase.Microsoft.VisualStuidio.Shell.Interop.IVsEditorFactory.CreateEditorInstance(UInt32, System.String, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy, UInt32, IntPtr, IntPtr ByRef, IntPtr ByRef, System.String ByRef, System.Guid ByRef, Int32 ByRef)' to access field
    'Microsoft.Internal.Performance.CodeMarkers.Instance' failed.
    Thanks in advance for your advice / help!

All Replies

  • Friday, June 18, 2010 9:26 AM
    Moderator
     
     

    Hello,

    a)     Try to run devenv /ResetSettings (in command prompt) to eliminate the related potential settings problem.

    b)     Try disabling Add-ins (e.g. “Tools” | “Add-in Manager”) or run “devenv.exe /SafeMode”.This can eliminate the possibility that third party Add-ins or packages are causing problems. (For more detailed VS command line switches information, see: http://msdn2.microsoft.com/en-us/library/xee0c8y7.aspx )

    c)     Try creating a new project. Sometimes corrupted project settings can cause problems. These are project specific.

    d)     Make sure that we have the latest service pack applied. Apply VS2008 sp1.

    e)     Try to reboot the operating system to safe mode. This can help to isolate whether any other applications are interfering with Visual Studio. Note that some features (like IIS) are not available under safe mode. Please check whether this can be applied or not. In addition to safe mode, we can also try “clean boot”: How to configure Windows XP to start in a "clean boot" state http://support.microsoft.com/kb/310353 .

    f)      Try to create a new user account. This can help isolate user profile corruption related causes.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
  • Monday, June 21, 2010 6:26 PM
     
     

    Edwer, 

     

    Thanks for the quick response and multitude of options to try. 

    Unfortunately it didn't seem to work.  To be clear - I am running VS2010 Professional and have tried a,b (no Add-ins), c, d (no sp for 2010 yet), e, and f. 

    I have fully unisntalled SQL Server 2008 Express. Repaired VS2010. Didn't work. Install SQL Server 2008 Developer. Didn't work. 

     

    I was under the impression that VS2010 repair was just as good as an uninstall, reinstall.   Are they any tools that could help me uninstall SQL Server and VS2010 and make sure nothing is left behind?  I have Revo Uninstaller but I'm not sure if that's the best tool. 

     

    Thanks,
    Chris

  • Thursday, June 24, 2010 2:38 AM
    Moderator
     
     Answered

    Hello Chris,

    You can try the VS2010 uninstall utility to uninstall VS2010: http://code.msdn.microsoft.com/vs2010uninstall


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
  • Wednesday, July 28, 2010 2:22 AM
     
     

    I'm experiencing the same problem.  So far, here's what I'm seeing:

    • (a) - no change / no joy.
    • (b) - I see a different message: "Package 'RadLangSvc.Package, RadLangSvc.VS, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' failed to load."

    I haven't gotten to the other options yet, but based on search results for the error I'm seeing for (b), it looks like there's an assembly(ies) missing.

    Any idea how to recover these files?

  • Monday, September 27, 2010 4:03 PM
     
     

    I'll chime in with a "me too" - I can't edit .sql files in studio. and 1/2 the time it locks up studio, and i have to force it to close.

     

    For now I can remember to edit in SQL.M.M. but it's painful.

    I can't afford to uninstall / reinstall - that simply isn't an option.

     

    [copy / paste of the error dialog]

    ---------------------------

    Microsoft Visual Studio

    ---------------------------

    Package 'RadLangSvc.Package, RadLangSvc.VS, Version=10.0.0.0, culture=neutral, PublicKeyToken=89845dcd8080cc91' failed to load.

    ---------------------------

    OK   

    ---------------------------


  • Wednesday, October 06, 2010 5:02 PM
     
     Proposed

    To fix the issue of not being able to load the RadLangSvc.Package here is what you need to do:

    1. Load up your ISO or DVD VS2010 Installer in an explorer window

    2. Go to the WCU foldler

    3. Go to the DAC folder

    4. Install MSI's

        i. DACFramework_enu.msi
       ii. DACProjectSystemSetup_enu.msi
      iii. TSqlLanguageService_enu.msi

    • Proposed As Answer by Scott CateMVP Tuesday, October 12, 2010 3:24 PM
    •  
  • Tuesday, October 12, 2010 3:26 PM
     
     Proposed

    To fix the issue of not being able to load the RadLangSvc.Package here is what you need to do:

    1. Load up your ISO or DVD VS2010 Installer in an explorer window

    2. Go to the WCU foldler

    3. Go to the DAC folder

    4. Install MSI's

        i. DACFramework_enu.msi
       ii. DACProjectSystemSetup_enu.msi
      iii. TSqlLanguageService_enu.msi

    These steps worked perfectly for me.

     

    Thank you - for saving me the entire re-install.

     

    For others - all 3 of the MSI's have a "repair" option when you run it, and they run in seconds. I was done installing all 3 of them in < 1 minute.

     

    Thank you!

    • Proposed As Answer by RickCole Monday, May 09, 2011 7:00 PM
    •  
  • Tuesday, October 26, 2010 12:33 PM
     
     
    Worked for me as well, thank you very much for a real solution to the problem.
  • Friday, November 05, 2010 7:19 PM
     
     

    I ran those three MSI files and doing so got rid of most errors.  But when I try to edit an SQL file in VisualStudio 2010 I get the following error:

     

    Attempt by method 'Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactoryBase.Microsoft.VisualStudio.Shell.Interop.IVsEditorFactory.CreateEditorInstance(UInt32, System.String, System.String,Microsoft.VisualStudio.Shell.Interop.IVsHierarchy,UInt32,IntPtr ByRef,IntPtr ByRef,System.String ByRef, SystemGuid byRef, Int32 ByRef)' to access field 'Microsoft.Internal.Performance.CodeMarkers.Instance' failed.

     

    I can edit other kinds of files OK.

  • Monday, November 08, 2010 11:01 PM
     
     

    To fix the issue of not being able to load the RadLangSvc.Package here is what you need to do:

    1. Load up your ISO or DVD VS2010 Installer in an explorer window

    2. Go to the WCU foldler

    3. Go to the DAC folder

    4. Install MSI's

        i. DACFramework_enu.msi
       ii. DACProjectSystemSetup_enu.msi
      iii. TSqlLanguageService_enu.msi

    Home run solution. Worked like a charm for me! I had removed the software added by these kits when I was uninstalling SQL Server 2008. I had mistaken them for part of SQL Server when really they are part of Visual Studio.
  • Thursday, November 18, 2010 11:20 PM
     
     
    Worked perfectly for me.  Thanks for the concise helpful details!
  • Tuesday, November 23, 2010 5:50 PM
     
     

    1. Load up your ISO or DVD VS2010 Installer in an explorer window


    2. Go to the WCU foldler

    3. Go to the DAC folder

    4. Install MSI's

        i. DACFramework_enu.msi
       ii. DACProjectSystemSetup_enu.msi
      iii. TSqlLanguageService_enu.msi

     

     

    Wow - this is great - the solution suggested worked perfect for me!

    Only took a minute or 2 to complete!

    THANKS!

     

     

  • Thursday, November 25, 2010 4:13 PM
     
     

    I have the same problem, and followed steps 1 thru 4 but could only install the

    • DACFramework_enu.msi
    • TSqlLanguageService_enu.msi

    because I could not find the DACProjectSystemSetup_enu.msi anywhere in the ISO. I still have the error. Where can I find the third msi file?

     

  • Wednesday, December 22, 2010 11:29 AM
     
     

    To fix the issue of not being able to load the RadLangSvc.Package here is what you need to do:

    1. Load up your ISO or DVD VS2010 Installer in an explorer window

    2. Go to the WCU foldler

    3. Go to the DAC folder

    4. Install MSI's

        i. DACFramework_enu.msi
       ii. DACProjectSystemSetup_enu.msi
      iii. TSqlLanguageService_enu.msi

    Wow!

    I spent more than 2 days on this problem. reinstalled several time, messed my registry and whatever, and now it took two minuts to solve it! Thank's for that solution. It worked perfectly for me, too!!

     

  • Tuesday, March 29, 2011 3:16 PM
     
     

    I am having the same problem, not being able to open sql files directly. I can open them via 'Open With' and selecting 'Source Code (Text) Editor' but not with either 'Transact-SQL Editor' options

    Loading devenv.exe /safemode give me the Packeage 'RadLangSvc.Package ... failed to load' error.

    Loading deven.exe normally i get 'Attempt by method 'Microsoft.SqlServer...IVSEditorFActory.CreateEditorInstance(...)' to access field 'Microsoft.Internal.Performance.CodeMarkers.Instance' failed.

    I cannot install the MSI from the DAC folder, I have VS2010 Ultimate SP1 installed, which are of a higher version. I did try some time ago the uninstall and reinstall option (rebuilt my Win7 box) which did not solve the problem. What is the real cause of this error?

    Below is all of the installed components

    Microsoft Visual Studio 2010
    Version 10.0.31118.1 SP1Rel
    Microsoft .NET Framework
    Version 4.0.30319 SP1Rel

    Installed Version: Ultimate

    Microsoft Office Developer Tools
    Microsoft Visual Basic 2010
    Microsoft Visual C# 2010
    Microsoft Visual C++ 2010
    Microsoft Visual F# 2010

    Microsoft Visual Studio 2010 Architecture and Modeling Tools
       
    UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

    Microsoft Visual Studio 2010 Code Analysis Spell Checker

    Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

    The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

    Microsoft Visual Studio 2010 Team Explorer
    Microsoft Visual Web Developer 2010

    Add Reference Dialog Plus!   1.0
    An significantly enhanced Add Reference dialog for managed code projects.

    AlignAssignments   1.0
    Command for aligning assignments.

    AutoBraceComplete   1.0
    auto brace complete

    Crystal Reports Templates for Microsoft Visual Studio 2010  
    Crystal Reports Templates for Microsoft Visual Studio 2010

    Document Well 2010 Plus   1.0.10916.0
    This package provides configurable behavior for the Document Well and its tabs. Please be sure to let us know what you like/dislike about this extension.

    ExtensionUpdateCheck   1.0
    Shows a notification icon in the system tray after Visual Studio startup if there are updates available for any installed extensions.

    Microsoft Team Foundation Server 2010 Power Tools   3.0.30423.0
    Power Tools that extend the Team Foundation Server integration with Visual Studio.

    Microsoft Visual Studio 2010 SharePoint Developer Tools   10.0.31118
    Microsoft Visual Studio 2010 SharePoint Developer Tools

    Microsoft Visual Studio 2010 Ultimate - ENU Service Pack 1 (KB983509)   KB983509
    This service pack is for Microsoft Visual Studio 2010 Ultimate - ENU.
    If you later install a more recent service pack, this service pack will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/983509.

    Microsoft Visual Studio Process Editor   1.0
    Process Editor for Microsoft Visual Studio Team Foundation Server

    Microsoft.VisualStudio.QuickAccess.Package   1.0
    Awesome search bar.

    OptionsPageImpl   1.0
    Information about my package

    QuickFind   1.0
    Visual Studio 2010 Quick Incremental Find Extension

    tangible T4 Editor   9.0
    tangible T4 Text Template Editor - T4 Editor

    VisualStudioIntegration2010   1.0
    Information about my package

    ANTS Profiler Add-in
    Visual Studio add-in that integrates ANTS Performance Profiler and ANTS Memory Profiler into Visual Studio to allow you to start profiling from inside Visual Studio.
    Visit www.red-gate.com for more information.
    Copyright (c) 2009-2010 Red Gate Software Inc.

  • Wednesday, March 30, 2011 11:02 AM
     
     

    To fix the issue of not being able to load the RadLangSvc.Package here is what you need to do:

    1. Load up your ISO or DVD VS2010 Installer in an explorer window

    2. Go to the WCU foldler

    3. Go to the DAC folder

    4. Install MSI's

        i. DACFramework_enu.msi
       ii. DACProjectSystemSetup_enu.msi
      iii. TSqlLanguageService_enu.msi


    Worked like a charm thank you!
    • Proposed As Answer by RickCole Monday, May 09, 2011 7:00 PM
    • Unproposed As Answer by RickCole Monday, May 09, 2011 7:00 PM
    •  
  • Friday, May 06, 2011 2:59 PM
     
     

    To fix the issue of not being able to load the RadLangSvc.Package here is what you need to do:

    1. Load up your ISO or DVD VS2010 Installer in an explorer window

    2. Go to the WCU foldler

    3. Go to the DAC folder

    4. Install MSI's

        i. DACFramework_enu.msi
       ii. DACProjectSystemSetup_enu.msi
      iii. TSqlLanguageService_enu.msi

    Perfect. This worked like a charm. It was driving me crazy. Thanks so much.
  • Monday, May 23, 2011 10:20 AM
     
     

    Perfect !!!

    This worked like a charm :-)

    Thanx a million !!!

     

  • Friday, June 10, 2011 2:00 PM
     
     

    tudoro, You are not alone. I also re-installed all 3 packages mentioned and now I can create db projects but when I open an sql file I get

    ---------------------------

    Microsoft Visual Studio

    ---------------------------

    Attempt by method 'Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactoryBase.Microsoft.VisualStudio.Shell.Interop.IVsEditorFactory.CreateEditorInstance(UInt32, System.String, System.String, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy, UInt32, IntPtr, IntPtr ByRef, IntPtr ByRef, System.String ByRef, System.Guid ByRef, Int32 ByRef)' to access field 'Microsoft.Internal.Performance.CodeMarkers.Instance' failed.

    ---------------------------

    OK   

    ---------------------------


    Fahad
  • Tuesday, June 14, 2011 6:24 PM
     
     
    Perfect solution. It just works!! Thank you.
  • Thursday, June 16, 2011 8:43 PM
     
     

    DOES NOT WORK FOR ME.

    Like Fahad349 and tudoro - I continue to get the same error even though I ran the .msi's.  I made sure I had the latest sp's and then ran the 3 .msi's again and it still throws this exception.

    Any other ideas are greatly welcome.

    Thanks

  • Friday, July 08, 2011 12:53 AM
     
     

    Like many others, reinstalling following packages worked Perfectly for me too...Just like a charm

     i. DACFramework_enu.msi
       ii. DACProjectSystemSetup_enu.msi
      iii. TSqlLanguageService_enu.msi

     

    Thank you very much for saving the time.

  • Friday, July 22, 2011 8:44 PM
     
     
    I had also installed VS 2010 SP1 and so was unable to install the three components mentioned in AndréDavis solution using the MSI's from the original VS installation DVD. However, I went into Add/Remove Programs, removed the components installed by these MSI's (Microsoft SQL Server 2008 R2 Transact-SQL Language Service, Microsoft SQL Server 2008 R2 Date-Tier Application Project, and Microsoft SQL Server 2008 R2 Date-Tier Application Framework), and then re-installed the components using the installers from the VS DVD. Having done this, I am able to open SQL files in VS 2010. I haven't found any problems related to the fact that these components aren't the versions from SP1.
  • Tuesday, November 22, 2011 11:23 AM
     
     

    It works!. It tooks just 1 minute and no PC restart needed :)

    (VS 2010 Ultimate SP1 + SQL Server Express 2008 R2)

    • Edited by Igor Gorjanc Tuesday, November 22, 2011 11:25 AM
    •  
  • Monday, January 09, 2012 4:54 PM
     
     

    Yes, this solution totally work. 

    I had SQL Server 2008 R2 and Visual Studio 2010.

    But i needed to reinstall the SQL Server 2008R2 because of some issues. After i re-install it, i had the same issues as everyone had in this forum. I cannot open .sql file on visual studio

    After i follow the solution installed these three files:

        i. DACFramework_enu.msi
       ii. DACProjectSystemSetup_enu.msi
      iii. TSqlLanguageService_enu.msi

    wow, it works without restart the machine ... it saved my life.

    Tommy

  • Tuesday, January 31, 2012 6:56 PM
     
     
    I had also installed VS 2010 SP1 and so was unable to install the three components mentioned in AndréDavis solution using the MSI's from the original VS installation DVD. However, I went into Add/Remove Programs, removed the components installed by these MSI's (Microsoft SQL Server 2008 R2 Transact-SQL Language Service, Microsoft SQL Server 2008 R2 Date-Tier Application Project, and Microsoft SQL Server 2008 R2 Date-Tier Application Framework), and then re-installed the components using the installers from the VS DVD. Having done this, I am able to open SQL files in VS 2010. I haven't found any problems related to the fact that these components aren't the versions from SP1.
    I had no problem installing the updates from the root of the SP1 disc over the RTM ones after following the suggested procedure above.
  • Thursday, March 01, 2012 7:58 PM
     
     

    Were you able to make it to work...installing 3.msi does not work for me either :(

    Thanks,

  • Wednesday, March 21, 2012 4:22 PM
     
     
    Thank you for the solution. it worked for me. i still can't believe after this long time Microsoft didn't came out with solution to fix this in repair mode. Anyway its still valid solution.
  • Thursday, March 29, 2012 10:16 AM
     
     

    Steps above perfectly worked for me too.

    Just could not found the WCU and DAC folder, instead the files were in root folder.

    Thank you for saving my time for trying any other work arounds.

    Thank You..

  • Monday, April 02, 2012 4:58 AM
     
     

    To fix the issue of not being able to load the RadLangSvc.Package here is what you need to do:

    1. Load up your ISO or DVD VS2010 Installer in an explorer window

    2. Go to the WCU foldler

    3. Go to the DAC folder

    4. Install MSI's

        i. DACFramework_enu.msi
       ii. DACProjectSystemSetup_enu.msi
      iii. TSqlLanguageService_enu.msi

    I have had this problem for a while without been able for figure it out. These steps really solved the problem.

    Thanks a lot, you really saved my day!!


    Garbiel Méndez. MCP, MCAD

  • Thursday, August 16, 2012 2:12 AM
     
     

    DOES NOT WORK FOR ME.

    Like Fahad349 and tudoro - I continue to get the same error even though I ran the .msi's.  I made sure I had the latest sp's and then ran the 3 .msi's again and it still throws this exception.

    Any other ideas are greatly welcome.

    Thanks

    I encountered the same problem as Fahad349, tudoro and pvecchio99. 

    I did the same a suggested in this thread, re-intalled the three .msi files and re-applied Visual Studio Service Pack 1.
    My initial problem was that my database project would not load. After the fix I was unable to edit SQL files with the same error as you have described.

    I got around the problem by:

     1) Right-click the sql file and selected 'Open with...'.
     2) Select 'Source Code (Text) Editor and Set as Default.

    You'll probably forfeit some VS SQL functionality, but I rely on SQL Management Studio for authoring SQL... 

    Hope that helps!

  • Friday, October 19, 2012 6:06 AM
     
     

    To fix the issue of not being able to load the RadLangSvc.Package here is what you need to do:

    1. Load up your ISO or DVD VS2010 Installer in an explorer window

    2. Go to the WCU foldler

    3. Go to the DAC folder

    4. Install MSI's

        i. DACFramework_enu.msi
       ii. DACProjectSystemSetup_enu.msi
      iii. TSqlLanguageService_enu.msi

    Worked for me, too. I can now open .sql files!!! Thanks!

  • Thursday, January 10, 2013 1:03 PM
     
     

    To fix the issue of not being able to load the RadLangSvc.Package here is what you need to do:

    1. Load up your ISO or DVD VS2010 Installer in an explorer window

    2. Go to the WCU foldler

    3. Go to the DAC folder

    4. Install MSI's

        i. DACFramework_enu.msi
       ii. DACProjectSystemSetup_enu.msi
      iii. TSqlLanguageService_enu.msi

    My Problem : Package 'RadLangSvc.Package, RadLangSvc.VS, Version=10.0.0.0, culture=neutral, PublicKeyToken=89845dcd8080cc91' failed to load. Sql proc can not open.

    Worked for me as well