开发者

Opening WebMatrix solutions in VS failing when 2 versions of VS installed

Microsoft's WebMatrix development tool has a "Visual Studio" button to launch the VS edi开发者_如何学运维tor and load it with the site you have open in WebMatrix.

Normally it loads VS 2010, since that's the only version that supports WebMatrix sites. But the other day at home it started trying to load VS 2008, and I got the error message:

The selected file is a solution file, but was created by a newer version of this application and cannot be opened.

This also started happening at work today. At both work and home I have VS 2010 and VS 2008 installed side-by-side. Does anybody know what the problem is and how to fix it?

At home I tried uninstalling VS 2008 and restarting the machine, but WebMatrix still couldn't see VS 2010 and prompted me to download some other free tool.

Microsoft recently sent out a bunch of updates, and as always, I applied the important ones. I wonder if that caused it.


By default, WebMatrix will use the last installed version of Visual Studio - so if you had installed Visual Studio 2008 after 2010 (or perhaps installed updates to 2008?), WebMatrix will default to running with 2008 because it considers it as the "current" version installed.

To change this, you may have to modify registry keys that Visual Studio uses to tell Windows which version is the "current" version.

These keys should be:

HKEY_CLASSES_ROOT\VisualStudio.DTE\CurVer = VisualStudio.DTE.10.0

HKEY_CLASSES_ROOT\VisualStudio.DTE\CLSID = {656D8328-93F5-41A7-A48C-B42858161F25}

The CLSID above came from HKEY_CLASSES_ROOT\VisualStudio.DTE.10.0\CLSID (possibly could be different, but 10.0 does refer to Visual Studio 2010).

Keep in mind to back up your registry before making any changes to it.


If you are running Visual studio 2012, use this:

HKEY_CLASSES_ROOT\VisualStudio.DTE\CurVer = VisualStudio.DTE.11.0 HKEY_CLASSES_ROOT\VisualStudio.DTE\CLSID = {059618E6-4639-4D1A-A248-1384E368D5C3}

The CLSID above came from HKEY_CLASSES_ROOT\VisualStudio.DTE.11.0\CLSID (possibly could be different, but 11.0 does refer to Visual Studio 2012).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜