Wednesday 14 October 2015

VIsual Studio 2015 not starting

Today I had an issue with Visual Studio 2015 not starting today after installing some updates in Visual Studio 2013, so I did some googling about how to diagnose issues with Visual Studio.

Visual Studio can actually write logs about its activities if you run it via:
devenv.exe /log

This causes VS to start logging to:
"%AppData%\Microsoft\VisualStudio\[Version]\ActivityLog.xml"

In my case VS 2015 is version 14, so I was looking in:
c:\Users\[account]appdata\Roaming\Microsoft\VisualStudio\14.0

Looking in the logs there was a log entry at ERROR level:
"No InprocServer32 registered for package [Async Query Service Package]"

My guess is the VS 2013 update messed with the dll for that package.

The resolution to this problem was to get VS 2015 to reinitialize itself by running this as an administrator from the Visual Studio command prompt:
devenv.exe /setup

Tuesday 28 July 2015

WPF and broken fonts


Today I had problems with starting up the Work Item Template editor in Visual Studio, and when I tried repairing my VS installation the installer kept crashing!

TL;DR:
If you have broken fonts in your Windows installation, running WPF apps (or running apps that use WPF like Visual Studio) will unexpectedly crash with a Type Initializer exception.
That will keep happening until you fix your fonts.



The installer logs the errors that the installer runs into. It logs to c:\users\he152234\appdata\local\temp\dd_vs_[xyz]_[date].log.

My VS installer was crashing with this error:
[0A94:25CC][2015-07-28T16:08:47]e000: MUX:  ERROR: The type initializer for 'System.Windows.Media.FontFamily' threw an exception.
[0A94:25CC][2015-07-28T16:08:47]e000: MUX:  Stack:    at System.Windows.Media.Typeface..ctor(FontFamily fontFamily, FontStyle style, FontWeight weight, FontStretch stretch)

It turns out VS’s installer is a WPF application and WPF apps are susceptible to broken fonts.

So.. what worked for me was:
Open cmd.exe and copy all files from c:\windows\fonts to some other folder (c:\fonts for me).
Open regedit and navigate to HKLM\Software\Microsoft\Windows NT\CurrentVersion\Fonts
Delete all font registrations (a little scary).

Open Fonts in Control Panel.
Drag all fonts from c:\fonts to the Control Panel Fonts window (this re-registers all valid fonts).
Restart the computer.

And I can run VS again! :)



Dave


Saturday 4 April 2015

Ikea Alkaline Batteries are pretty good?

BitBox has built a rig for testing battery performance and run a low drain and high drain test on a number of widely available batteries:
Low Drain
High Drain

The results are surprising: Ikea Alkaline battieries are value for money!

In my mind, Ikea batteries were categorised as the type of batteries that you'd put into remote controls. Clearly my opinion needs to change on this! I've been using Varta high energy alkaline batteries at home for environments which are hostile to rechargable NiMH (e.g. low drain, hot environments), but I'll give Ikea a try next time!