Wednesday, November 1, 2017

Visual Studio Professional 2013 Crashes on Windows 10... A Solution!!!

So...  This morning Microsoft pushed down a large Windows 10 update.  My Outlook had been randomly crashing since installing Windows 10 so thought it would be a good idea to install the update.


After only...  30 minutes, the update was finished.  I started my normal every-day work programs like Chrome, Putty, SQL Server Management Studio, Excel, Outlook, etc...  Then I started my installation of Visual Studio Professional 2013.

Nope.  Wouldn't work.  Would simply lock up with this window (on the left) after just about 15 seconds.

Event Viewer showed the exception in two separate events:

First Event:
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentNullException
   at System.IO.MemoryStream..ctor(Byte[], Boolean)
   at System.IO.MemoryStream..ctor(Byte[])
   at Microsoft.VisualStudio.Shell.Connected.ConnectedUser.Utilities.BitmapFromPngOrJpeg(Byte[], Microsoft.VisualStudio.Shell.Connected.ConnectedUser.Logger)
   at Microsoft.VisualStudio.Shell.Connected.ConnectedUser.AvatarCache+<>c__DisplayClass2.<.ctor>b__0()
   at Microsoft.VisualStudio.Shell.InvokableFunction`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].InvokeMethod()
   at Microsoft.VisualStudio.Shell.InvokableBase.Invoke()

Exception Info: System.ArgumentNullException
   at Microsoft.VisualStudio.Shell.ThreadHelper.InvokeOnUIThread(Microsoft.VisualStudio.Shell.InvokableBase)
   at Microsoft.VisualStudio.Shell.ThreadHelper.Invoke[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Func`1<System.__Canon>)
   at Microsoft.VisualStudio.Shell.Connected.ConnectedUser.AvatarCache..ctor(Microsoft.VisualStudio.Services.Profile.AvatarSize, Byte[], Boolean, Microsoft.VisualStudio.Shell.Connected.ConnectedUser.Logger)
   at Microsoft.VisualStudio.Shell.Connected.ConnectedUser.AvatarCache..ctor(Microsoft.VisualStudio.Services.Profile.Avatar, Microsoft.VisualStudio.Shell.Connected.ConnectedUser.Logger)
   at Microsoft.VisualStudio.Shell.Connected.ConnectedUser.ProfileCache..ctor(Microsoft.VisualStudio.Services.Profile.Profile, System.Guid, System.Uri, System.String, Microsoft.VisualStudio.Shell.Connected.ConnectedUser.Logger)
   at Microsoft.VisualStudio.Shell.Connected.ConnectedUser.Connector+<ConnectAsync>d__1.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at Microsoft.VisualStudio.Shell.Connected.ConnectedUser.IdeUserSession+<ConnectAndInitializeSessionAsync>d__a.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at Microsoft.VisualStudio.Shell.Connected.ConnectedUser.BaseUserSession+<ConnectAsyncImpl>d__17.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at Microsoft.VisualStudio.Shell.Connected.ConnectedUser.BaseUserSession+<ConnectAsync>d__2.MoveNext()


Second Event:
Faulting application name: devenv.exe, version: 12.0.21005.1, time stamp: 0x524fcb34
Faulting module name: KERNELBASE.dll, version: 10.0.16299.15, time stamp: 0x2cd1ce3d
Exception code: 0xe0434352
Fault offset: 0x001008b2
Faulting process id: 0x1958
Faulting application start time: 0x01d35325baa1390f
Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: b0bb84fb-22a5-4efd-a88e-57bb6b1a32ca
Faulting package full name:
Faulting package-relative application ID: 

So...  After about 4 hours of poking on the internet and trying different things I found a solution that worked for me.  This will only work for people with valid logons to Microsoft MSDN who have access to Visual Studio.  (I am not certain how this would work for the free versions.)

  1. Run this in a command box:   DEVENV /resetuserdata 
  2. Add the line 127.0.0.1 app.vssps.visualstudio.com to the HOSTS file.
  3. Start Visual Studio 2013 and you should see a screen like the one below...
  4. Clicked Sign-Out on that screen.
  5. Remove the line added to the HOSTS file.
  6. Restart the computer.
  7. Go to MSDN website to get your Product Key for Visual Studio Pro 2013 (or whatever version you have installed.).
  8. Start Visual Studio.  
  9. When the User Information / Product Information screen pops up again, click “Change my product license.” 
  10. Enter your Product Key.
  11. Close Visual Studio and restart your computer one more time.


And, that's it.  My Visual Studio Professional 2013 is running fine once again.  Well, with one exception...  Now, every time I start it, I am prompted for my MSDN password.

There is mention that once you get VS running, you can select Tools -> Extensions and Updates -> Updates and install Update 5.  If you opt to try this upgrade install, be certain you have the time.  My upgrade is still downloading after 20 minutes.

Edit 1: Installing Update 5 does seem to complete the fix.

YMMV

According to this reference, this specific problem started happening today...



No comments:

Post a Comment