Jonas Stawski

Everything .NET and More

Opening Solution File Won’t Start Visual Studio

If you are running Windows Vista or Windows 7 with UAC enabled and Visual Studio set to Run as Administrator and you try to open a Solution File through Windows Explorer, Visual Studio will not open. If you check the “Choose default program” for SLN files you will see that is set to use Microsoft Visual Studio Version Selector, which is the source of the problem. What I think is happening is that the version selector recognizes the right program to open, but since it is not running in elevated trust (Run as Admin) it doesn’t have enough permissions to run another program (Visual Studio) as an Admin and Windows kills it.

image

The solution is to change the Microsoft Visual Studio Version Selector to run as an admin. To do so navigate to %ProgramFiles%\Common Files\Microsoft Shared\MSEnv or %ProgramFiles(x86)%\Common Files\Microsoft Shared\MSEnv (64-bit), right click on VSLauncher.exe and select Properties. Go to the Compatibility tab and check “Run this program as an Administrator”.

Thanks Gene Merlin for the tip!

Comments (2) -

That fixes it, thanks!!!

Reply

Apparently as of some service pack that fix doesn't work.  

Another approach suggested updating the manifest in the launcher to obey the 'run as' setting of the launcher file (the manifest overrides the file setting apparently)  That approach also did not work for me.

An additional recommendation was to remove the offending patch (KB2492386) which broke things.  I didn't try it.. as at this point I just have VS6 (uses DSW files) and VS2010 ( SLN files), so I don't really need the broken launcher.

So I just associate SLN files with VS2010 directly (and not the version launcher).  

Maybe MSFT can get its act together on this stupid issue.. I mean, who introduces a tool and then breaks it.. but doesn't back out the tool?!  Not holding my breath though.

Reply

Add comment

biuquote
Loading