从WebMatrix 2启动Visual Studio会打开错误的版本 [英] Launching Visual Studio from WebMatrix 2 opens wrong version

查看:114
本文介绍了从WebMatrix 2启动Visual Studio会打开错误的版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Microsoft WebMatrix 2 在一个简单的ASP.NET WebPages网站上工作.当您进入文件视图时,将出现一个 Visual Studio启动按钮,该按钮应在 Visual Studio 2012 中打开网站解决方案.在我的计算机上,我还安装了Visual Studio 2010,这是单击按钮时打开的版本.

如何确保已打开Visual Studio 2012?

我正在使用Windows 8,但是我很确定这也适用于Windows 7和XP.我怀疑我可能在2010年之前安装了2012年,这也许可以解释我的机器如何进入这种状态,但是我不确定是否记得.

解决方案

感谢 Mike Brind 了解该解决方案的技术细节他的博客文章 WebMatrix打开了错误的Visual Studio版本./p>

基本上,您需要更新这些注册表项以指向Studio的正确版本.修改 Windows注册表时,请记住要小心!

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

运行以下命令将首先备份注册表项,并将值设置为Visual Studio2012.您将需要打开管理员/提升权限命令提示符来执行它们.

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

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.

解决方案

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

这篇关于从WebMatrix 2启动Visual Studio会打开错误的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆