The other day I came across a bit of a strange issue when trying to delploy a backup to a fresh SqlExpress 2008 R2 instance. I had setup the Wix Sql database tag using a loopback address:
but for some reason it wasn’t connecting at all just erroring with a most helpful error message:
CreateDatabase: Error 0x80004005: failed to create SQL database but continuing, error: unknown error, Database: [DATABASE_NAME]
I enabled TCP/IP so that I could use sql profiler and re-ran the installer hey presto guess what it worked! Obviously as SqlExpress only installs with “Shared memory” enabled this was the issue, it couldn’t connect. I tried the sqlcmd method of using “lpc:” as a prefix but still no joy. It turns out that if you cannot use a hostname or ip for the servername to switch over to shared memory’ you have to use “.” as the server name:
Recently I have been back creating Wix installers and unfortunately I came across a a bug in the RC0 that was causing issues with my Burn bootstrapper. This had already been fixed in the latest sources so I went ahead and built the latest sources. This wasn’t as easy as I though it would be so here are the steps I needed to take:
- Install the Windows SDK 7.1 (http://www.microsoft.com/en-us/download/details.aspx?id=8279) (I just did a full install)
- Install Mercurial (http://mercurial.selenic.com/)
- Clone the latest Wix sources into a local folder (hg clone https://hg.codeplex.com/wix)
- Change directory to the new wix folder.
- Switch to the Wix36 branch (hg update wix36).
- Setup an environment variable called WIX_ROOT pointing to your newly downloaded sources (In my case C:\source\codeplex\wix).
- Open up a VS2010 command prompt in administrator mode and navigate to the WIX_ROOT path.
- Run make.bat.
Now once that is completed, hopefully you should only have non-fatal errors and warnings an if that is the case the latest wix installer will be located under %WIX_ROOT%\build\debug\x86\release\%WIX_VERSION%\.