Double-clicking to open Visual Studio solution files on Vista

I got so tired of not being able to double-click my solution files in the Windows explorer that I finally figured out how to fix it.  First of all, I should mention that I'm running with UAC on in Vista and that I have VS configured to run as an admin.  So, I get prompted each time I start it, but that's OK, it’s a good reminder that I am running elevated and should test my code without the admin privileges. 
 
I was trying to figure out why, when my VS is set to run as admin, double-clicking would not work.  The thing that jumped out at me is that VS is not the default program for SLN files.  The Visual Studio Version Selector is the default program.  My first thought was to run that selector as admin all the time, but that didn't work.  So, I decided I don't need a version selector since I only have one version of VS on my machine right now, and mapped SLN files to DevEnv.exe.  Now, when I double click them, I get the UAC prompt and then it opens right up in Visual Studio. 
 
Hopefully this helps someone else with this little annoyance. 

Posted May 21 2007, 02:11 PM by matt-milner
Filed under:

Comments

Mauricio DIAZ ORLICH wrote re: Double-clicking to open Visual Studio solution files on Vista
on 05-21-2007 1:53 PM
Good one!

I actually new the version selector opened .sln files, but somehow it never occurred to me that mapping the solutions directly to Visual Studio would solve the "problem".

Great tip, thanks.
Joe wrote re: Double-clicking to open Visual Studio solution files on Vista
on 05-21-2007 2:40 PM
Hmm, I never double click .sln files. I always open VS and the load the solution from Recent Projects menu. Isn't that easier?
Matt Milner wrote re: Double-clicking to open Visual Studio solution files on Vista
on 05-21-2007 3:12 PM
Joe,
I use A LOT of solutions, so even with an MRU length of 10, I often want to open something that I haven't had open most recently. Otherwise, I definitely use the MRU list.
Matt
Michael Rawi wrote re: Double-clicking to open Visual Studio solution files on Vista
on 05-22-2007 8:11 PM
Matt, I too, had figured this problem yesterday, when I start re-install my Vista. Could you tell me, where is the selector application located ? I've tried to look in Program Files folder, but have no luck until now.
Keith Brown wrote re: Double-clicking to open Visual Studio solution files on Vista
on 05-25-2007 9:22 AM
Matt,

From what I've heard, you don't actually NEED to run VS.NET as admin. You only need that if you want to start a debugging session.

You might want to try running VS.NET under UAC in your normal, restricted logon session. Then you'll also be able to drag and drop files - kinda nice to be able to do that :)
Wuschba wrote re: Double-clicking to open Visual Studio solution files on Vista
on 07-05-2007 6:59 AM
Anyone got this working with DDE so that you can open files like .cs or cpp in an running IDE?
Matt Milner wrote re: Double-clicking to open Visual Studio solution files on Vista
on 07-11-2007 6:45 AM
Wuschba,
I haven't gotten the DDE working, but as Keith points out, it will work if you are not running elevated.
My only problem with not running elevated is that I rarely open VS when I am not going to run a debugging session. I am continually testing and running my code in debug mode as I go. I like to see the stack, drill in on exception details, etc.
Mossa wrote re: Double-clicking to open Visual Studio solution files on Vista
on 07-21-2007 2:19 PM
Well, I have XNA installed, so that doesn't work for me. I knew about, I need a solution to the issue itself...

Sajeev Prasad / Arun Arcot wrote re: Double-clicking to open Visual Studio solution files on Vista
on 10-30-2007 3:51 PM
It works when you set both
Launcher (C:\Program Files\Common Files\Microsoft Shared\MSEnv\VSLauncher.exe) and IDE(C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe) to run as administrator.
(Right click .exe and select Propertries -> Compatibility, and choose Run as Administrator)

Hope this helps.



PandaWood wrote re: Double-clicking to open Visual Studio solution files on Vista
on 12-15-2007 1:31 PM
I had the same problem, googled it, found this and it certainly did help, thank you!
CodeMetropolis wrote Double Click on the .sln file doesn't open Visual Studio on Vista
on 07-27-2008 1:02 AM

Double Click on the .sln file doesn't open Visual Studio on Vista

Add a Comment

(required)  
(optional)
(required)  
Remember Me?