Tag Archives: wix

VS2012 Achievements Failure

I’m not sure exactly how long I’ve had this problem, but Visual Studio 2012 would crash every time I tried to build a solution that contained a Wix project. My workaround was simple: unload the Wix project or use Visual Studio 2010. It was more of an annoyance than a work-preventer, so I didn’t really worry about it. Yesterday, I thought I’d try to figure it out.

At first, I didn’t really have much to go on. I had some exceptions that showed up in the Event Viewer, but the internet didn’t seem to pick up on any correlation between Wix, VS2012, and the exceptions. I also asked our resident install guy/Wix expert if he’d run into this or heard about it from other developers. He hadn’t. He did some googling and gave me a few results related to the .NET Reflector plug-in, but I didn’t have that installed.

Eventually, I ended up on this forum post. The first comment made me feel pretty dumb:

Did more debugging using the vs2012 log: the WiX installer project triggers an exception in the vs extension “Visual Studio Achievements For VS 2012” published by Microsoft.

Ugh, really? The Visual Studio Achievements extension? It’s so irritating to discover that this gimmicky plug-in causes Visual Studio to completely crash and die when building a Wix project! I disabled the extension, restarted Visual Studio, and I was able to build Wix projects. I liked getting random achievements from time to time, but after this, I’m out. Have a good life, Visual Studio Achievements.

Advertisements

Permanent Deployment with Wix

There are certain situations where you may want to deploy files permanently to a computer so that they persist through uninstall/re-installs or upgrades. A typical situation in my business is we’ll deploy a config file with default settings. If the settings change, we don’t want them to be lost or overwritten during an upgrade.

By making a very simple modification to your Wix installer, we can get this behavior.

<Component Id="C_Settings.config" Guid="*" NeverOverwrite="yes" Permanent="yes">

The NeverOverwrite attribute ensures that the file will not be overwritten during an upgrade, and the Permanent attribute will cause the file to remain in the program is uninstalled. Perfect!