14
votes

I have two separate projects from two separate TFS VCS roots that I want to be part of the same build and was wondering if this is possible.

Project 1

VCS Root: $/ProductName/Development/Project1

Build file path: API/API.sln

Project 2:

VCS Root: $/QA/Test/Tools/Project2

Build file path: Test/Test.sln

I want step #1 of the build to compile Project 1, and step #2 to compile Project 2. How can I do this if the build file path is relative to the VCS root/checkout directory and the solutions are from two different VCS roots?

Thanks in advance!

1
i dont see what the problem is. Add 2 vcs roots to your build configuration and add two build steps? Where's the clash?James Woolfenden
Ack! I'm obviously still a TeamCity noob and didn't realize that was an option. Thanks for the tip! Things are resolved now.Keith
Why not just to create to build configurations? This would be more convenient.Krzysztof Wolny
@KrzysztofWolny because you are limited to the number of build-confs you can have.jsnfwlr

1 Answers

23
votes

it is possible to have two VCS Roots and change the checkout folder of them (so not check out both in the root folder). For that, change the "Checkout Rule" on our "VCS Roots" dialog and add for your project:

For Project1:

+:.=>project1

And for Project2:

+:.=>project2

Than you get this structure in the root:

root
  - project1
  - project2