2

My copy of Visual Studio 2012 is instable. It starts up and I can load projects, compile and run them. But from time to time it crashes randomly. It now also crashes when I try to add a new windows form to a project. But the crashes are independent from the project loaded.

My first idea was to install all new updates but if I go to the updates & extensions section it opens the dialog box and crashes 1 second afterwards. I then thought I might deinstall it and reinstall VS 2012 or 2013. But I also cannot deinstall it. If I go to windows programs to deinstall it I can click on the change button, but after this the installation program crashes. I also tried to download the VS 2013 preview and install it but this also crashes before showing a dialog box of window.

So I don't know how to proceed. Does anybody else have similar problems?

1 Answers1

5

Try running Visual Studio in Safemode (devenv /safemode) or run it with logging turned on (devenv /log) the logs will be written to a folder in your user profile. Also check the Eventlog to see whether there's a error report. There should be 2 events logged when Visual Studio crashes. One "Application Error" and one ".NET Runtime Error". The latter will provide information about the stack trace that causes the crash:

Event log for Visual Studio

When you try to uninstall Visual Studio, first remove update 1, 2 or 3, then repair or remove the whole thing. If uninstall fails, i'm afraid you'll need repave the machine to get it back in a supportable state. When you uninstall an update, you always need to repair Visual Studio itself before re-applying the updates.

Try removing all addins (Resharper, NDepend, etc) and extensions (either from the Visual Studio Updates and Extensions window or by deleting them from the Visual Studio or User profile folder).

Try resetting settings and add-in settings (devenv /ResetSettings) and (devenv /ResetSkipPkgs), try rebuilding all templates (devenv /setup).

You can even attach one Visual Studio instance as a debugger for the other to see where the exception occurs. Sometimes it can give you valuable information, sometimes the crash just doesn't happen because the actual issue is timing related.

If all else fails, open a support call with Microsoft, file a bug on Connect or do a clean re-install of your system.

Judging from you Error message you're running the Visual Studio 2012 Web Developer Express edition, instead of devenv, try wdexpress from a normal (windows) commandline window.

Another common issue that can make Visual Studio very unstable, is a corruption of the Add-in cache. Clearing it will trigger Visual Studio to rebuild it for you.

Community
  • 1
  • 1
jessehouwing
  • 106,458
  • 22
  • 256
  • 341
  • Ok, in the event viewer I get the following: Anwendung: WDExpress.exe Frameworkversion: v4.0.30319 Beschreibung: Der Prozess wurde aufgrund eines internen Fehlers in der .NET-Laufzeit beendet. bei IP 5F5E2386 (5F590000) mit Exitcode 80131506. (It only says that there was an internal error). The application error shows: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll. I should have written that I am using VS Express, so I think I am missing the command window. How can I still enter the devenv /xxx commands? – Michael Gerbracht Jul 20 '13 at 14:42
  • Yes, I do get an Application and Runtime error. It might have to do with the updates. What I tried is to create a .bat file with the content: "mypath\WDExpress.exe devenv /safemode". But it complains that it cannot find the devenv file. Edit: I just found out that I can leave away "devenv" to start it in safe mode. I will now try some of the commands... Thanks for yur help! – Michael Gerbracht Jul 22 '13 at 17:30
  • Now I got a new error message when opening a project. I found it in the ActivityLog. Do you have any idea what this could mean?: "System.BadImageFormatException: [C:\Windows\Microsoft.Net\assembly\GAC_MSIL\VsDebugPresentationPackage\v4.0_11.0.0.0__b03f5f7f11d50a3a\VsDebugPresentationPackage.dll] Mit dem Token ist keine Zeichenfolge verknüpft. bei Microsoft.VisualStudio.Debugger.DebuggerToolWindows.DataTips.PinnableTips.UI.Markers.TaggerProvider.CreateTagger[T](ITextBuffer buffer) bei Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)" – Michael Gerbracht Jul 22 '13 at 17:42
  • Ok, thanks for your help. I tried to reset the settings and tried the other suggestion you made without success. I have now filed a bug on connect. Thank you very much for your help! – Michael Gerbracht Jul 23 '13 at 18:10