After a recent reboot, Visual Studio just stopped working. Whenever I clicked on the icon on my desktop, I’d see this:
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.
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
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 'GettingStartedSetup.dll' 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.
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.
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.