开发者

Assign .vcproj files to Visual Studio 2008, when Visual Studio 2010 installed

开发者 https://www.devze.com 2023-04-10 00:43 出处:网络
I have encountered a strange error. I use Windows 7 x64. Visual Studio 2010 (VS10) and Visual Studio 2008 (VS08) are both installed. Now i want to make sure that when i doubleclick open a .vcproj file

I have encountered a strange error. I use Windows 7 x64. Visual Studio 2010 (VS10) and Visual Studio 2008 (VS08) are both installed. Now i want to make sure that when i doubleclick open a .vcproj file it is being opened by VS8 and not VS10. Now this seems like a trivial problem, but: "righclick -> open with -> choose default program -> select devenv.exe of VS08 -> always open with" doesnt work. In fact after browsing for devenv.exe of VS08 it does not show up i开发者_开发问答n the list/menue where it is supposed to be displayed.

This is very strange and annoying, maybe someone already encountered this error and know a solution.


I GOT IT! For the Express versions at least. I strongly suspect these instructions can be modified to apply to the full version. The names will change of course.

I spent a lot more time on this than I will ever save by being able to click through to the correct IDE, but darn it, I just hate to give up.

Here's the deal. Strangely, the associations seem to be keyed to the program file names. (Say, what?? That sure is the way it looks to me.) Both VC++ Express 2008 and 2010 are named VCExpress.exe. We'll give the 2008 version an alias. We'll also use a doppelganger to pull off something of a ruse.

  1. Navigate to "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE". Make a copy of VCExpress.exe, (not a shortcut), and re-name it VCExpress-2008.exe. (It would probably do just to re-name the original and use the new name in step 3.)

  2. Open regedit.exe. Create a new key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\VSExpress-2008.exe

  3. Edit the (default) value in that key, to hold the string "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\VCExpress.exe" [sic]

  4. Go through the drill with the file-association dialog again. Right-click, open with, choose default program, yada, yada, yada. Browse your way down to C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE and click on VSExpress-2008.exe.

  5. VCExpress-2008 now shows up as a program in good standing, with its icon proudly displayed on the front page above the fold. (Don't tell the dialog, but you and I know it really points to VCExpress.exe, not the copy we made.) Click it.

  6. Celebrate.


Ok i finally found a way. You can use the application "default programs editor" to mess with the standard file associations.

0

精彩评论

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