43

When I opened Visual Studio 2013 today, I got an error. "A problem occurred when loading the Microsoft Visual Menu....", it asked me to reset VS environment via “devenv /resetsetting’’ command and try it again. However it doesn't work.

See the image. It is the latest Visual Studio 2013 edition. I got an update yesterday. yes

ErstwhileIII
  • 4,829
  • 2
  • 23
  • 37

6 Answers6

58

SOLUTION

The way to resolve this issue is by editing your System Environment Variables. In my case my System Path Variable had a string which was over 2048 characters, which apparently causes random path haywire at unpredictable times. By making sure this is below 2048 characters, it will solve the problem. Make sure you restart explorer.exe after changing the path variables and getting them under 2048 characters.

Chris Hawkes
  • 11,923
  • 6
  • 58
  • 68
  • 4
    Ha, very cool. This approach worked for me. This might also save me on some restarts down the line. By the way, my nonsense began after I adjusted system variables during OpenCV installation. Nothing major either... just added OPENCV_DIR variable and all came down crashing (even after removing it). – B.K. Sep 08 '15 at 17:57
  • 1
    The "update" fixed my issue. I wish I could upvote just the "update" section :D – Roman Starkov Oct 14 '15 at 17:18
  • 2
    I *just* realized I was having that problem after installing the new Oracle .NET Client. Thus, the PATH gets all crazy long. Time for a haircut so to speak. – Rob Koch Oct 15 '15 at 13:10
  • 2
    Funny story, I have VS2010 and VS2015. When VS2010 stopped working, I repaired the install which apparently appended to the `PATH` environment making VS2015 not working. After removing the redundant entries with [Rapid Environment Editor](http://www.rapidee.com/en/download) everything is back to normal again. – John Alexiou Dec 27 '15 at 21:14
  • 1
    This solved this problem, and several others for me. I had been unable to uninstall Visual Studio, and had been experiencing other problems with explorer, and this one fix (my system path was just over 2048 characters) cleared it all up. – Drewmate Feb 19 '16 at 23:35
  • 1
    My PATH wasn't actually 2048 characters - only 1926 - but reducing it further fixed this for me. I was getting the 'corrupt menus' message every time I started VS 2015 and had to run it from the command line with the /resetsettings option every time in order to get it to start at all (and then of course I lost all my settings!). Thanks for the solution! – Rich Mar 23 '16 at 14:07
  • 1
    This has to be the most stupid and obtuse error I've ever had on Windows. The 255 file path limit is bad enough, but at least that one tells you what the issue is. – Dan May 31 '16 at 15:00
  • 1
    I had the same issue and I had multiple versions of visual Studio. I had uninstall some unwanted softwares which reduced the size of the path variable to less than 2048, it all works fine. – Ramesh Sep 06 '16 at 17:15
  • 1
    You are seriously my hero. Installing Oracle's ODP.net totally hosed up all of my system settings. The error message in the OP was not helpful at all – Hambone Jan 03 '17 at 13:20
19

I don't know why it happened. After I reboot the machine, the error disappeared.

  • If anyone else comes across this and is in the middle of things and can't reboot their machine yet. I was able to just run devenv.exe directly from the command line without the switch then open solutions once the IDE was loaded that way. – bronsoja Feb 27 '15 at 16:50
  • 3
    Yeah, this doesn't work for me. Resetting my settings doesn't work. Launching as admin doesn't work. I'm basically not able to open from anything but the command line anymore. Pretty lame... – Robert Kelly May 18 '15 at 22:32
  • This happened to me too. I am not sure. After rebooting, the IDE works fine.. After some hours, the IDE crashed like this again. I install Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2013_x86_ENU my machine is 64 bit. I am not so sure is that the problem? but my friends pc is 32 bit OS install that BIDS his IDE is fine. Mine is error – Khaneddy2013 Nov 20 '15 at 03:59
9

i had the same issue and it worked if i do "Run As Administrator"

youkebb
  • 161
  • 1
  • 7
1

Same error popped up for me in Visual Studio Ultimate 2015 Preview. Problem disappears after restarting windows, no need to run the command and lose your settings.

Daniel de Zwaan
  • 3,064
  • 25
  • 24
1

I got the same problem but could bypass it running VS as administrator (right clicking...). When I checked my path variable in without elevated privileges saw it was way shorter than the path variable running with eleveated privileges (runas administrator). So i just replaced my short path variable with the largest one (which has more tan 2048 characters by the way) and voila! problema solved! Hope it helps. PD: I never thought you could've 2 different path variables depending if running or not under full admin privileges.

AlfredoRevilla-MSFT
  • 3,171
  • 1
  • 12
  • 18
1

Check your path variable. It must not exceed 2048 characters. If it is, reduce it.

Remember Monica
  • 3,897
  • 1
  • 24
  • 31
Nicketa
  • 11
  • 1