Tim Van Wassenhove home

Here is something you may have experienced already: As a newcomer on an existing project, you check out the code from source-control and discover that the build is broken. When you ask around no-one else seems to have that problem but a helpful collegue is kind enough to tell you that you can find the installers for the missing dependencies at location X (Let’s not even mention the places where those installers are not available *sigh*).

Anway, in order to avoid such a situation you could organize your solution in such a way that all the dependencies (libraries and tools) are part of it. A typical folder structure would look like this:

screenshot of typical solution folder organization

In order to get those files out of the installer and in your solution (instead of installed under %Program Files%) you could do an administrative install of the msi (eg: msiexec /a Blah.msi) but i find it easier to use Qwerty.Msi.

Here are a couple of settings you may want to add to your build configuration in order to make your self-contained build work

<!-- Configure solution directories -->
<basePath Condition="'$(BasePath)'==''">$(MSBuildThisFileDirectory)..</basePath>

<!-- Configure tool directories -->
<!-- the ending \ is required for the extension pack -->
<!-- wix will use this property to determine the location of other files -->

<!-- Configure target file paths -->

<!-- Configure WIX -->

With this solution in place the next ‘new guy’ does not have to waste time trying to figure out where those dependencies are ;)