Debugging a Visual Studio Crash

After a recent reboot, Visual Studio just stopped working.  Whenever I clicked on the icon on my desktop, I’d see this:

image

When the obvious solution (restarting my computer) I had to dig a little deeper.

Step 1:  Logs

The first step is to get some more information.  You can tell Visual Studio to log at startup by passing it the /log parameter on the command line.  Now, I’m fairly comfortable with the command line, but I rarely ever use it to start up Visual Studio.

An easier way is to just use the Diagnostic Mode option in the jump list.  Right click on the Visual Studio icon in your taskbar and select Diagnostic Mode.

image

Now all I had to do was wait for Visual Studio to crash again.  To get to the logs right click on the Visual Studio icon again select Open Activity Log Location.  With my setup, this opened C:\Users\Josh\AppData\Roaming\Microsoft\VisualStudio\12.0.  The log file is ActivityLog.xml.

In the log just search for a line like

<type>Error</type>

Hopefully, there aren’t too many of them.  In my case it pointed to a missing DLL

  <entry>
    <record>371</record>
    <time>2015/01/26 21:26:02.821</time>
    <type>Error</type>
    <source>Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost</source>
    <description>Could not load file or assembly &apos;GettingStartedSetup.dll&apos; or one of its dependencies. The system cannot find the file specified.</description>
    <path>C:\USERS\JOSH\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\12.0\EXTENSIONS\UVLFSVOS.E40\GettingStartedSetup.dll</path>
  </entry>

I went to the folder specified and verified that the DLL was missing.  Next thing to do is open up the extension.vsixmanifest to determine which extension it was.  Looking at the DisplayName node, it was fairly clear that it was Release Management tools for Visual Studio 2013.

<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011">
  <Metadata>
    <Identity Id="9b4bef8e-2ac3-4fa8-b8c7-d93d73d3618b" Version="2.2" Language="en-US" Publisher="Microsoft" />
    <DisplayName xml:space="preserve">Release Management tools for Visual Studio 2013</DisplayName>
    <Description xml:space="preserve">Release Management tools for Visual Studio helps to quickly get started with creating a Release Definition to automate the deployment of your application to multiple stages. You start with a working Build definition and then using this tool, set up a release pipeline that enables triggering of a Release for each build that is available for the build definition.</Description>
    <MoreInfo>http://www.visualstudio.com/products/release-management-for-microsoft-visual-studio-vs</MoreInfo>
    ...
  </Metadata>
    ...
</PackageManifest>

Step 2:  Safe Mode

Now that I know which extension was misbehaving, all I needed to do was uninstall it.

Open up Visual Studio in safe mode.  This can be done with a command line switch or through the jump menu again.

image

Visual Studio should open w/out a problem.  From here, it’s easy sailing.  Open up the Extensions and Updates tool, find the problematic extension in the Installed list, and press the uninstall button.

image

Now I was able to restart Visual Studio and it worked just fine.  I could have re-installed the extension, but I didn’t really need it so I just left it uninstalled.

This entry was posted in .NET, C# and tagged , by Josh. Bookmark the permalink.

About Josh

I signed up for a BASIC class in junior high. That got me hooked and pretty soon I started experimenting with harder languages. My college years are a blur of benders hopped up on Perl and Java and that one semester where I sunk so low that I was mainlining Smalltalk. Now I'm a complete C# junky living it one day at a time. Hello, my name is Josh.

2 thoughts on “Debugging a Visual Studio Crash

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>