193

When I open my solution by double click on solution file in a file manager, Visual Studio 2012 asks me whether I want to save devenv.sln: enter image description here

How can I avoid this annoying thing? (except of opening vs first and than solution - I want just to click a solution file in my file manager).

4
  • 1
    Which file is devenv.sln? Are you opening project files directly without them being associated with a solution file? Are you using VS to debug running processes or crash dump files without access to the source code?
    – Dai
    Commented Nov 28, 2012 at 1:45
  • 1
    @Dai 1 question: devnv is a process which belongs to VS. have no idea what devenv.sln is. 2 question: no. 3 qustion: no. Commented Nov 28, 2012 at 3:22
  • 2
    looks like I've found a solution - social.msdn.microsoft.com/Forums/en/vssetup/thread/… will check later Commented Nov 28, 2012 at 3:24
  • 1
    I also experienced this after I had set devenv.exe to run as administrator in the compatibility tab. After also setting the vslaucher.exe to run as administrator (as suggested here) the problem was resolved.
    – Bruno
    Commented Aug 21, 2013 at 11:33

2 Answers 2

317

As indicated here, you have to configure "C:\Program Files (x86)\Common Files\microsoft shared\MSEnv\vslauncher.exe" to run as Administrator.

  1. Right-click C:\Program Files (x86)\Common Files\microsoft shared\MSEnv\VSLauncher.exe
  2. Select Properties
  3. Click Compatibility
  4. Set "Run this program as an administrator".

I also did the same for C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe.

11
  • Which other versions of Visual Studio do you have installed, if any? If more than one, did you install them in order of their version where Visual Studio 2012 was installed last?
    – Rami A.
    Commented Jan 22, 2013 at 1:19
  • I have VS 2008-2012. yes, I installed them in order of the versions. Commented Jan 22, 2013 at 20:42
  • 3
    Did you install Visual Studio 2012 Update 1? When I right-clicked on "C:\Program Files (x86)\Common Files\microsoft shared\MSEnv\VSLauncher.exe" > Properties > Compatibility > and set "Run this program as an administrator", double-clicking a VS2010 and VS2012 sln files in Windows Explorer works as expected. I also did the same for "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe". You may want to double-check both exes to make sure that setting was saved correctly.
    – Rami A.
    Commented Jan 22, 2013 at 21:56
  • A note to those coming from the msdn link in this answer (that now links to this stackoverflow post) - this answer worked for me without having to do any of the registry editing mentioned - just make this one change and it will fix the problem. Commented Mar 10, 2015 at 8:48
  • Yes i start as administrator, but i always want to start it as administrator, how can i fix this then? Commented Nov 9, 2015 at 14:00
2

Another option, a bit less obvious, is to save the devenv.sln file to the Visual Studio IDE folder for that version of Visual Studio. This was an option described in the link noted above.

Probably not the best option, but it is an option none the less.

1
  • This seems to be the quickest and for me the safest way, as I don't want to always open all sln files with admin. Commented Oct 14, 2020 at 2:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.