20

My Visual Studio began crashing at start-up. In my search for finding a remedy, I found these two suggestions, but neither worked for me:

  • Launching Visual Studio while running in safe mode, and
  • Running repair on Visual Studio.

However, I found that if I logged into a different Windows account, Visual Studio was able to run from that account without crashing.

Here is an error code that that I observed in the crash report:

LCID: 1033

Can anyone provide a solution for returning my Visual Studio to working order?

DavidRR
  • 18,291
  • 25
  • 109
  • 191
Tharik Kanaka
  • 2,490
  • 6
  • 31
  • 54

12 Answers12

62

For me it turned out to be the plugin that GitExtensions installed into Visual Studio 2013.

-- UPDATE: try this before uninstalling GitExtensions

@Enceradeira proposed in the comments to uncheck the Show current branch in Visual Studio option. In GitExtensions, you get there via Tools -> Settings -> Appearance:

enter image description here

-- END OF UPDATE

After uninstalling GitExtensions and reinstalling it with all VS plugin unselected my VS runs smoothly again.

I even put together a blog post about this issue because it bugged me so much.

Oliver
  • 9,239
  • 9
  • 69
  • 100
  • 1
    It was Git extensions VS extension for me too. Uninstalling the extension solved the issue – skajfes Feb 24 '15 at 08:55
  • Same. Uninstalled Git extensions and installed them again. Now all works fine. Thanks. – DeividasV Mar 06 '15 at 21:04
  • 3
    Uncheck "Show current branch in Visual Studio" in Git Extension -> Appearance did the trick for me – Enceradeira Apr 13 '15 at 08:11
  • @Enceradeira: Thanks for the great hint. That's a lot less painful than uninstalling and reinstalling. But if VS won't even start in the first place, than that won't work, I guess. – Oliver Apr 14 '15 at 09:03
  • @Oliver: I unchecked this option in the Git Extension. I don't know how things play together but VS crashed in my case as well. So unchecking it in the Git Extension made VS not crash anymore. Magic! – Enceradeira Apr 14 '15 at 14:36
  • 4
    I've also just encountered a GitExtensions-related startup crash due to hiding the toolbar (https://github.com/gitextensions/gitextensions/issues/2691). Solution is to start in safe mode, show toolbar, then restart normally. – Ashley Apr 22 '15 at 17:48
  • 1
    Same issue, BTW you don't have to uninstall the whole package, just run GitExtensions installer, click change and uncheck Visual Studio Extension, this will uninstall just the buggy VS component. – Xeevis May 02 '15 at 14:08
  • It worked and the setting does not appear to do anything. Any idea why this works? – Soenhay Mar 17 '16 at 17:43
  • @Soenhay: I have no idea, no. I haven't looked into the plugin code. – Oliver Mar 18 '16 at 12:25
  • @RobertKoernke: The dialog in the screenshot is from GitExtensions. – Oliver Apr 27 '16 at 20:53
23

Since you're able to run with another user login, something may be wrong with your local settings, you can try to reset them: devenv /resetsettings in Start menu -> Run.

Warning: this will restore visual studio to default settings.

Arun M
  • 1,452
  • 8
  • 13
  • 1
    even after started resetting VS will crash. – Tharik Kanaka Nov 12 '12 at 06:17
  • 11
    another possibility is data stored in %LocalAppData%; you can try renaming `%LocalAppData%\Microsoft\VisualStudio` and `%LocalAppData%\Microsoft\VSCommon` to something else and start VS? Are you running en_US VS and what is system culture? – Arun M Nov 12 '12 at 11:51
  • @ArunMahapatra, I do not know about the host of the question but for me it worked. +1 – Reza M. Jun 11 '13 at 03:50
  • 1
    For me, running /resetsettings simply brings up VS and it crashes - the same way it does at startup. Remove the 2 LocalAppData folders doesn't make any difference either – PandaWood Mar 25 '15 at 03:42
  • @PandaWood can you share the callstack from eventvwr.exe? Which version of VS? With any updates? Which OS? – Arun M Mar 25 '15 at 16:31
  • @ArunM Hi Arun, yeah, I'm about to reinstall Windows to get around this but here's a stack trace - https://gist.github.com/PandaWood/46f3f6782e6ecfe3a6ee . All versions of Visual Studio that I have installed VS2012, VS2013, and VS2015 CTP (latest) - all crash on startup! For a while VS2012 worked, but it's dead now too. I believe this all started when Atom had a bug that wrote endlessly to %TEMP% and various programs don't seem to handle TEMP access denied very well and get permanently corrupted – PandaWood Mar 27 '15 at 00:31
  • My colleague had better luck with a different command line argument: `/ResetUserData`. Please see [my answer](https://stackoverflow.com/a/47137673/1497596). – DavidRR Nov 06 '17 at 13:07
9

In my case VS used to crash on a single solution. I resolved the problem by deleting the respective solutions's user file: SolutionName.suo

Stefan Michev
  • 4,795
  • 3
  • 35
  • 30
  • 1
    The new location of the .suo is in the .vs folder in the solution directory (in case you have difficulty finding it in 2015) – MineR Jan 03 '17 at 04:05
  • This solution worked for me in VS2019 ver 16.5. The problem showed in one solution, but not another. So it seems to be a solution-specific issue. – Dan Eckhart Mar 24 '20 at 14:30
  • thanks for this! +1 in my case, i had two .suo files (possible from a previous instance of vs?) and after removing both and restarting VS2017, a single .suo file was created and VS opened without any issues. – prismeyez83 Apr 07 '20 at 09:16
4

My colleague recently experienced a problem with Visual Studio 2013 crashing on start-up. Unfortunately, we found that the approach recommended in the answer by @Arun M did not solve the problem:

devenv.exe /ResetSettings

...however, using a different command line argument did:

devenv.exe /ResetUserData

An easy way to run devenv.exe is via the Visual Studio command prompt; on Windows 10, it can be found here:

Start Button => All Apps => Visual Studio 2013 => Visual Studio Tools =>
  VS2013 x86 Native Tools Command Prompt

For more about these command line arguments for devenv.exe, see this answer to this related question: How do I truly reset every setting in Visual Studio 2012?. ⚠ In particular, please note the cautionary statement in that answer about the /ResetUserData command line argument!

DavidRR
  • 18,291
  • 25
  • 109
  • 191
3

Try to run VS as administrator. That's necessary in my case.

jossif
  • 399
  • 2
  • 10
2

If coincident to these Visual Studio crashes you are getting "Heap corruption" (Exception code: 0xc0000005) errors in your Windows Application log (Faulting module name: WindowsCodecs.dll), here is something worth checking into: A faulty WIC component within Expression Blend can cause ALL versions of Visual Studio to crash upon launch, as well as cause Internet Explorer to crash upon visiting many, if not most sites. Even though Microsoft distributes this component, they call it a "non-Microsoft component". As such, a Visual Studio reinstall won't fix this,, an OS reinstall over existing Windows installation won't fix this, and a system file integrity check won't detect it.

If my case, the misbehaving codec was "C:\Program Files (x86)\Microsoft Expression\Common\Imaging\4.0.360.0\PSDCodec.dll", and simply unregistering this component got my Visual Studio working again from consistent startup launch crashes.

I post this in hopes this solution to one source of Visual Studio crashing might save others from the $500 Microsoft support incident fee and week of downtime this caused me.

zax
  • 844
  • 8
  • 14
1

I just changed the windows language in the bottom right to "EN", then started as admin. And it worked, interesting..

stratovarius
  • 3,720
  • 1
  • 30
  • 26
1

I had the very strange phenomenon that both Visual Studio 2010 and 2013 on a Windows 7 machine crashed when run in a remote desktop session, started from a Windows 10 pc. Debugging the crash showed a CultureNotFound exception. It was caused by regional settings on the Windows 10 pc, which could not be translated in something understood by Windows 7. I had language English(Belgium) with an Azerty keyboard. I added and selected English(UK) with an Azerty keyboard and the crashes disappeared. No other programs suffered from this.

oscar1919
  • 129
  • 3
0

For me it was being caused by Web Essentials and I was able to resolve by disabling it, restarting VS, enabling it back , restart again. Works now.

parliament
  • 21,544
  • 38
  • 148
  • 238
  • 1
    How did you disable it (presumably without being able to run VS)? – PandaWood Mar 25 '15 at 03:38
  • actually, I just realized my situation was alittle different, mine was crashing when I would open a project, so I was able to see the landing page – parliament Mar 26 '15 at 03:41
0

I had a crash on startup (or soon after startup, before opening any solution) occurring in git2-msvstfs.dll, caused by placing a 3GB temp file into a directory within my solution. Deleting the file fixed it.

Saxon Druce
  • 17,406
  • 5
  • 50
  • 71
0

Once I accidentally pressed a random key combination (maybe something like ctrl+', but I didn’t realize I was holding ctrl down so I forgot what keys I hit by the time I realized something bad had happened) that resulted in VS Professional 2017 15.3.5 crashing within half a minute. After relaunching, I found that VS would be interactive for a few seconds before it would crash within half a minute. It was really too fast for me to try to figure out what I had accidentally activated or for me to disable it before VS would crash. Also, it would even crash if I didn’t open any solution, so I figured it was not something that deleting a .vs (per project/solution Solution Explorer/open files state) folder would fix.

To fix, I followed Arun M’s comment and renamed my %LOCALAPPDATA%\Microsoft\VisualStudio\15.0_3f4d04be folder. You will need to adjust the path for the edition/version of VS that is crashing. On my machine, I think 15.0_3f4d04be is Professional and 15.0_0fed6c59 is VS Community Edition. You’ll probably have to guess based on the folder’s modification timestamp which is probably going to reflect the date you last used that edition of VS.

After renaming the versioned dotfolder, VS launched without crashing. It started with default settings but automatically restored some of my settings through the cloud sync stuff after a minute of running and it even remembered my account information so I didn’t need to sign in.

I did not need to rename my %LOCALAPPDATA%\Microsoft\VSCommon folder (which Arun M had also suggested).

binki
  • 7,754
  • 5
  • 64
  • 110
0

I had a similar problem, both VS2015 and VS2013 would crash at startup. Tracked it down to an application I installed which put .net 4.7.2 on the system. Once i removed that app, removed .net, and reinstalled .net 4.6, Visual Studio started working again.