I always try to ensure the following tenet in my projects:
After a fresh checkout a developer should be able to do all project related tasks with solely the contents of the combined folders.
Obviously, this isn't always possible (e.g. Visual Studio for Windows development). However, I really dislike having to install any third-party libraries or tools that are specific a project like log4net, NHibernate, NUnit, etc. There are number of reasons for this including:
- For a given development machine, you may work on several different projects, all which leverage different versions of the same third-party library or tool.
- Minimizing the environment setup requirements makes setting up new developers or machines much easier
- Facilitates easier maintenance of automated builds
- I am currently using WiX 3 beta, but if there is way for either 2.0 or 3.0 please respond
- I am using Visual Studio 2005
- The IDE syntax highlighting is not a requirement.
Is it possible to avoid local installation of the WiX toolset and use flat files instead? If so, please explain how.
First, build your WiX installer:
- Create a new WiX Installer Project in Visual Studio 2005.
- Build your WiX XML accordingly.
Now, to integrate the WiX toolkit into your source tree:
c:\Program Files\Windows Installer XML v3\binto a sub-directory in your source tree. I used
WiX\binrelative to my .wixproj file.
c:\Program Files\MSBuild\WiX\v3.0\to a subdirectory in your source tree. I used
WiX\v3.0relative to my .wixproj file.
- Either add the following code or replace the line that follows:
<WixTargetsPath Condition=" '$(WixTargetsPath)' == ''>$(MSBuildExtensionsPath)\Microsoft\WiX\v3.0\Wix.targets</WixTargetsPath>
With the following lines:
<WixToolPath>$(MSBuildProjectDirectory)\WiX\bin\</WixToolPath> <WixTasksPath>$(MSBuildProjectDirectory)\WiX\v3.0\WixTasks.dll</WixTasksPath> <WixTargetsPath>$(MSBuildProjectDirectory)\WiX\v3.0\Wix.targets</WixTargetsPath>
As you can see, the
WixTargetsPath directives reflect the location of the folders I've instructed you to copy.
- Rename your .wixproj to .csproj. This ensures that Visual Studio does not get confused by the .wixproj file but because the .wixproj is a valid MSBuild project, Visual Studio will be able to work with it.
Using this method, the WiX directory as described is about 9MB large.