Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Saturday, April 11, 2009 8:03 PM | 2 votes
I have both VS 2005 & VS 2008 installed. I need VS 2008 to be the default version. What registry changes must I make to get this to happen?Helen
All replies (21)
Monday, September 13, 2010 1:25 PM ✅Answered | 7 votes
I had the same issue long ago and dug out the answer, it was much more difficult to find than it should be. I believe the setting we're all looking for is in the registry at:
HKLM\Software\Microsft\Windows\CurrentVersion\App Paths\devenv.exe
I set this default string to the filespec of the devenv.exe I want to use when I double-click on a *.sln file, for example.
Hope that helps.
rugs
Monday, April 13, 2009 8:34 AM
Hi Helen
If you get VS2003, VS 2005 and VS 2008 installed on the same computer, the solution file will be opened by "Microsoft Visual Studio Version Selector" by default.
It can detect which version of VS, these solutions/projects were created since VS2005 (at %ProgramFiles%\Common Files\Microsoft Shared\MSEnv\VSLauncher.exe).
Here is a blog describes this: http://integralpath.blogs.com/thinkingoutloud/2006/02/vs2005net_v20_a.html
Thanks.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Monday, April 13, 2009 2:31 PM
Thank you but this is not what I need. I know that there are some registry settings that can be made using RegEdit to set the default version, which I previously found after another long, frustrating Internet search. Unfortunately (foolishly!) I did not save a bookmark to the solution, assuming (wrongly) that once I set the default version I would never need to set it again. Alas, some app or other knew better than me what I needed and reset it to VS 2005, and now I need to repeat the process yet again. Believe me, when I finally find the solution, I WILL bookmark it, as it appears that once is not enough in this case. I must add that I suspect there are lots of other developers out there that are equally frustrated that you cannot set an option from the IDE, and, failing that, that it is so hard to find out how to perform this simple task.Helen
Tuesday, April 14, 2009 3:27 AM
I'm not sure why you must modify the registry to set default open program.
Why not select the file and right click, browse for the version of IDE that you want it to be default program and set it as "Always use the selected program to open this kind of file", isn't it easier?
VS2005 IDE program is typically at %ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE\devenv.exe
Thanks.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Tuesday, April 14, 2009 2:24 PM | 1 vote
Unfortunately I am often in the habit of double-clicking on a file to open it, and since VS 2005 is now the default version of Visual Studio, even when I have VS 2008 open, if I make the mistake of double-clicking on, say, my deployment version of web.config, instead of the file just opening, Visual Studio 2005 starts to cumbrously load its unwelcome self into memory. It does the same thing if I try to open a Silverlight Xaml page as well. So I either have to unlearn the habit of double-clicking, or reset the default version of Visual Studio to the one I want. I would love to just uninstall VS 2005, but unfortunately that is not an option either (and anyway, that would probably break something in VS 2008, and *still* be the default version).
Why should this be such a big deal? Why shouldn't developers be able to easily set the default version of Visual Studio? Or, if it can't be made easy, at least let us know how to do it.Helen
Wednesday, April 15, 2009 3:20 AM
Hi Helen
So you want VS2008 be the default program to open some kind of files(such as .sln .csproj etc.), right?
To set the default open program of the kind of files, you can do the following steps:
- Select a file of this kind and right click
- Browse for the version of IDE that you want it to be default program (Visual Studio 2008 program is typically at %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe)
- Check the "Always use the selected program to open this kind of file" and press OK
This should make it, but if not, please let me know.
Thanks.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Wednesday, April 15, 2009 5:58 PM
Figo, I already know how to set the default program for opening files with various extensions (since Win 05 in fact). I realy do not want to have to do this with every possible file extension used by Visual Studio.
I also know that there are simple registry settings to accomplish what I want to do -- change the default instance of VS to 2008 (not 2005). IIRC, it
s somehwere in the CurrentControlSet hive, but I really cannot recall the details. Is there no-one who does know? I cannot be alone in wanting to do this -- is there really no KB article to help?Helen
Friday, April 17, 2009 7:09 AM | 4 votes
Hi Helen
Sorry for the delay.
I guess you installed VS2008 prior to VS2005 (thus,those VS relevant file types are associated with VS2005 version), right?
Regarding solution and project files, it is recommended to use "Microsoft Visual Studio Version Selector" to choose the suitable version. And it's by default.
If you want to double click open the source code files with extensions such as *.vb *.cs *.cpp etc. via VS2008 instead of VS2005,
An easy and reommended way is to utilize "Restore File Associations" in the VS2008's menu: Tools > Options > Environment > General (find the button "Restore File Associations", and it will do what you want without twisting the registry).
Please let me know if it works for you.
Thanks.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Friday, April 17, 2009 9:08 PM
No, I did not install VS2005 after installing VS 2008. However, it appears that when I installed some add-in or other (I recall that my WCF templates were missing, for example, and I had to do another lengthy Internet search to fix that problem), the installation process capriciously reset the default version of VS. After having this happen to me before, I spent hours of time trying to find a way to set the default version (by editing the registry), and I managed to get VS 2008 set as the default. Alas, I assumed that I would not have to do it again, so I did not bookmark the solution. How wrong I was. I wish I could remember the successful search phrase I used to find the solution, but I cannot.
Yes, I could go and reset file associations. And the next time the default version of VS is reset, I can do it again. And again. And again. Such fun! And what is this process doing? Why, changing registry settings, no? But clearly I must be prevented from changing the ONE registry setting that will set the default version of Visual Studio.
Anyway, I'll keep trying to find the solution on my own, when I have time and patience to fool with it, and if I am successful I'll post the result.
Tuesday, April 21, 2009 4:28 AM
Hi Helen
"Yes, I could go and reset file associations. And the next time the default version of VS is reset"
--Some clarification with you: what do you mean "the next time"?
The "Restore File Associations" applies the changes of registry based on current user.
If the current user profile is reset back, there will be a problem.
*For example the key: HKCU\Software\Classes\cs\default) is set to "VisualStudio.cs.9.0"(without quotes), if the *.cs file is associated with Visual Studio 2008.
*
Thanks.Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Tuesday, April 21, 2009 2:27 PM
What I mean when I say "... the next time the default version of VS is reset" is that I have already gone through this process once, successfully got VS 2008 set as the default, and now I find Hey Presto! something has set the default back to VS 2005. I can only guess as to what it might be, among the various hotfixes, serivce packs, add-ons, etc -- but SOMETHING reset it. So now I get to do it all again. And it is not the current user has changed. There is only one user on my development machine (me), and I always log on with the same credentials.
Anyway, as I said, I have wasted more than enough time on this. I will now go and waste even more time on Expression Blend.
Thursday, April 23, 2009 3:25 AM
Hi Helen
It seems that some process(es) may change those registry keys back after "Restore File Associations" helps to set the default IDE version.
To further dig into this problem, I'd suggest to use Process Monitor: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx.
It can help find out what has/have changed those registry keys (for example HKCU\Software\Classes\cs\default)).
To filter irrelevant information, we can utilize the filter function within the tool.
In this case, add some "Include":
Path is *HKCU\Software\Classes\cs\default)
*Operation is RegSetValue
In this way, we may find out the cause, then we can think of further actions to solve the problem.
Thanks.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Thursday, May 7, 2009 7:51 PM
I have the same problem, Helen. I think what you are asking for has nothing (or little) to do with the file association, but with the default version of VS, which is important for things like plug in installation. I'm hitting the same issue, how do I make Visual Studio 2008 the default version so that my plug in instal runs against 2008 versus 2005?
Tuesday, June 9, 2009 8:06 AM
As for Helen's issue, I guess the cause could be the add-in of VS2005, please try to uninstall or disable the add-ins when using VS2005 (can also launch the VS2005 into safemode by /SafeMode switch)
And then use "Restore File Associations" in VS2008.
Thanks.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Send us any feedback you have about the help from MSFT at [email protected]
Tuesday, August 17, 2010 1:33 PM
I have the same issue, I have installed VS 2005, VS 2008 and recently VS 2010. Now when I double click a solution file (.sln) it tries to open it in VS 2008 regardless of the version of visual studios it was created with. So, I have to remember to right click on the solution file and choose to “Open With” then select “Microsoft Visual Studio 2010”.
Yes I have gone and associated the files with VS 2010 but the next time I double click the solution file it reverts back to trying to open with VS 2008. There has to be a simple fix for this and I too would think it would most likely be a registry change.
Anyone know where it might be?
Thanks.
Monday, September 13, 2010 1:49 PM
Thank you, thank you, thank you!
I hope they don't delete your post :)
Helen
Monday, September 13, 2010 2:18 PM
Thx, I was monitoring this thread & since I came across while looking for this solution. Glad I did and Glad you came along.
Tuesday, November 30, 2010 8:57 AM
HI Figo Fei
i had henel's problem with double clicking on sln file in vs 2008 and 2010 and with using "Restore File Associations" in vs 2010 my problem solved .
Thanks for your solution
babak
Tuesday, March 15, 2011 2:49 PM
Thanks. This worked for me. Neither using the version selector nor right clicking and setting the default for opening worked but this did! Thanks!
Friday, April 8, 2011 3:11 PM | 1 vote
I have the exact same problem with MSVC 2010 vs. 2008 under Windows7 64bit for open a project (not a solution) - the selector is broken and launches directly into 2010 even if VSLauncher is set to run as administrator (properties/compatibility). The File Association dialog refuses to add the Visual Studio 9 devenv.exe to the list of programs (but lists IE and other nonsensical choices), so your suggested solution does not work - I would say the "Choose default program:" and control panel "Default programs" is also broken.
Given that this appears to be a registry setting, it is not clear to me why this cannot, and has not, been fixed trivially. Alternatively, I do not understand why vcproj files aren't simply extended as vcproj9 etc. to remove the ambiguity in the first place.
Before I start modifying the registry
HKLM\Software\Microsft\Windows\CurrentVersion\App Paths\devenv.exe
I'd like a confirmation that there is indeed no official fix for this.
Thursday, May 5, 2011 10:02 AM | 1 vote
Same issues as bk_ .. I have VS2008 and VS2010 .. have tried "File Associate Restore" in VS 2008 to no veil. all my projects keep opening up with VS2010. The control panel "Default programs" does not list all installed programs including VS.
= (