Question

We have a TeamCity build server with a couple of agents set up to build code on check in for several c++ projects. Now, we've run into some problems regarding handling dependencies on Windows SDK since

  • It's to large to check-in and still be able to work with the source smoothly.
  • Several can't be installed at the same time without problems.

The easiest way to set up TeamCity agents is to just install the Windows SDK. However, installing two versions the Windows SDK is problematic since it seems to overwrite registry entries of previous installations. Another approach is to cherry-pick files from the installation and put it on an rsync-server or the like, but the Windows SDK installer seems to modify Visual Studio binaries, etc so that does not feel good either. I've also checked with microsoft and they strongly suggested against cherry-picking files from the SDK install.

How have you set up your c++ projects on TeamCity and what would you suggest in our situation?

Was it helpful?

Solution

If you make sure the versions of the SDK are installed in the same location on each machine that you use (both developer and build machine) then you can add a step to the start of your build scripts which sets the current SDK for use. You can do this either:

  1. Using the registry settings (if you have only one build going at any time)
  2. Using environment variables, which you reference in your project files for lib, bin etc.

I've seen this work pretty well before, although we we weren't using TeamCity.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top