The new version of Wix is great.   Over the last couple of weeks I have been migrating to the new inbuild project from within Visual Studio 2005.   It is really nice being able to do File->Create New Project from within Visual Studio and have a project that will natively compile a setup project for you.   However, like any beta product there are a couple of issues.  

The first that that I came across was when I started to use some of the UI extenstions (Add Reference WixUIExtension).   I suddenly started getting the errors that started “The localization variable … Is unknown”. 

After scratching my head and doing a bit of searching.  I realised that I needed to specific a culture.  So I openned up the project properties and entered the Culture in the culture.   After compiling again I still had the same problem.   Strange, so I openned up the properties and the culture was missing.   I repeated the steps again as I thought I might have missed something.   Still the same problem.

So how did I fix it?  Pretty simple.   The steps are:

  1. Right Mouse click on the project and select Unload Project
  2. Right Mouse click on the project and select Edit
  3. This will bring the project file up in XML Mode
  4. Add inthe tag
    <Cultures>en-US</Culture> To the property group.  eg <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 
      <PropertyGroup> 
        <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 
        <ProductVersion>3.0</ProductVersion> 
        <ProjectGuid>{d81b51fe-c662-4aba-b69d-fb805da175df}</ProjectGuid> 
        <SchemaVersion>2.0</SchemaVersion> 
        <OutputName>ASetupProject</OutputName> 
        <OutputType>Package</OutputType> 
        <WixToolPath>C:\Program Files\Windows Installer XML v3\bin\</WixToolPath> 
        <Name>ASetupProject</Name> 
        <Cultures>en-US</Cultures> 
      </PropertyGroup>
  5. Save and right click the project and select Reload and you are done!

 The issue was that in the current version the project properties were not getting saved correctly.

Advertisements