Launching Visual Studio from WebMatrix 2 opens wrong version
Asked Answered
F

1

11

I'm using Microsoft WebMatrix 2 to work on a simple ASP.NET WebPages site. When you are in the Files view, there is a Visual Studio Launch button that should open up the site Solution in Visual Studio 2012. On my machine I also have Visual Studio 2010 installed and that is the version that gets opened when I click on the button.

enter image description here

How can I make sure that Visual Studio 2012 is opened?

I'm working on Windows 8 but I am pretty sure this applies to Windows 7 and XP as well. I suspect I may have installed 2012 before 2010 which may explain how my machine got into this state but I can't remember for sure.

Fivepenny answered 21/12, 2012 at 1:47 Comment(0)
F
18

Thanks to Mike Brind for the technical details of the solution in his blog post WebMatrix Opens Wrong Version Of Visual Studio.

Basically you need to update these registry entries to point to the correct version of Studio. Remember to be careful when modifying the Windows Registry!

HKEY_CLASSES_ROOT\VisualStudio.DTE\CLSID
HKEY_CLASSES_ROOT\VisualStudio.DTE\CurVer

Running the commands below will backup the registry entries first and set the values to be Visual Studio 2012. You will need to open an administrator / elevated priviledge command prompt to execute them.

reg export HKEY_CLASSES_ROOT\VisualStudio.DTE %HOMEPATH%\Documents\VisualStudio.DTE-RegistryKeyBackup.reg
reg add HKCR\VisualStudio.DTE\CLSID /ve /d {059618E6-4639-4D1A-A248-1384E368D5C3} /f
reg add HKCR\VisualStudio.DTE\CurVer /ve /d VisualStudio.DTE.11.0 /f
Fivepenny answered 21/12, 2012 at 1:47 Comment(2)
For reference, VS2013 is CLSID {3C0D7ACB-790B-4437-8DD2-815CA17C474D} and CurVer VisualStudio.DTE.12.0Dendy
For reference, CurVer for VS 2015 is VisualStudio.DTE.14.0 and the CLSID is A2FA2136-EB44-4D10-A1D3-6FE1D63A7C05 (from Mike's linked blog post)Faulty

© 2022 - 2024 — McMap. All rights reserved.