I am working on the next step of my continuous integration project, which is to get TeamCity to create my application to automatically change the version number of all assemblies, and then create an installer.
First, a little background:
I have successfully launched TeamCity over the past few months, and it builds my configurations and performs NUnit and NCover tests perfectly.
I spent a little time learning installers - I always hated InstallShield and never reviewed it for my current application. I like NSIS, but then came across WiX . I do not have an intimate knowledge of the MS Installer architecture, which, as I understand it, is dangerous for complex projects, so at some point I will need to learn more about this. However, a few days after going through SO questions, searching the Internet and reading blogs, I have a WiX project that successfully creates, installs, runs the application and deletes everything cleanly. Fine!
I also wanted the TeamCity build configuration to automatically update the version number of all my builds. I was able to combine this functionality by setting BeforeBuild and FileUpdate to change the version number. This works correctly, except that on my development machine I don't have build_vcs_number_1 to replace.
So, when I am now - I need TeamCity to perform the update, and although it has the build_vcs_number_1 environment variable , I cannot figure out how to access the tasks of the WiX MSBuild community.
In one post I read, it is recommended to check the MSBuild targets in the SVN folder. I have a / extlib folder for such things, so my TeamCity VCS validation rules look something like this:
+:tags/2010-10-15=>src +:extlib=>extlib
How to get extlib from an environment variable? When I run the build, TeamCity complains (and correctly) that it cannot find c:\wix30\MSBuildCommunityTasks . Actual C:\TeamCity\buildAgent\work\3e073d2b74226378\extlib\wix30\MSBuildCommunityTasks . The folder is automatically generated, since I'm doing a server-side check, so there must be some kind of environment variable that TeamCity sets so that I can use the correct path.
One thing that I should note is that I went into the assembly configuration -> Properties and environment variables and found an unintuitive droplist with all existing variables and did not see anything that sounded like a variable indicating the path worked.
One possible solution that I can think of is to simply set up the MSBuild community tasks on the build server, and then I can create a system environment variable that can be accessed by <WixToolPath> .
Does anyone have any other suggestions?