Launching Visual Studio from WebMatrix 2 opens wrong version

你说的曾经没有我的故事 提交于 2019-12-21 03:47:26

问题


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.

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.


回答1:


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


来源:https://stackoverflow.com/questions/13983217/launching-visual-studio-from-webmatrix-2-opens-wrong-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!