Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6785649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:09:11+00:00 2026-05-26T17:09:11+00:00

I have 2 build configurations in one project: Build & Test Code Deploy Code

  • 0

I have 2 build configurations in one project:

  • Build & Test Code
  • Deploy Code

I want Deploy Code to run only if Build & Test Code built successfully, so I set up a snapshot dependency.

Does a snapshot dependency mean that Deploy Code will check out the same SVN revision as Build & Test Code and then run the NAnt script against that checkout, which will not contain the compiler generated post-build files? Or, will a snapshot dependency on Build & Test Code from Deploy Code mean that the NAnt will run against the post-build, working directory files of Build & Test Code on the build agent?

UPDATE:

It seems if I put a snapshot dependency on Build & Test Code for Deploy Code and I have a build of the latest revision for Build & Test Code, my NAnt script will deploy the post-build files for that build of Build & Test Code.

I would still like to confirm that I understand the concept, as I don’t really understand the Team City documentation. I think I should probably make sure Deploy Code runs on the same build agent as Build & Test Code, otherwise I might run into a case where Deploy Code checks out the SVN revision and then just deploys the pre-build code files. Is this correct?

My confusion is mainly because it seems you have to have a VCS setup for Deploy Code. Is that because it needs it to compare revision numbers to the snapshot dependency?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:09:11+00:00Added an answer on May 26, 2026 at 5:09 pm

    From the Snapshot Dependency section of the Dependent Builds doco page:

    A snapshot dependency from build configuration A to build
    configuration B enforces that each build of A has a “suitable” build
    of B so that both builds use the same sources snapshot (used sources
    revisions correspond to the same moment).

    So the idea of a snapshot dependency is that you can run a build against exactly the same codebase as another build which has successfully run against it.

    If you want the “deploy code” build to run only after “build and test code” has successfully run, create a snapshot dependency in the second build and make sure it’s set to “Only use successful builds from the suitable ones”.

    Keep in mind that this has nothing to do with artefacts; the second build will simply pull the same codebase and recompile it all over again. If you want to deploy the artefacts created from the first build, then you want to be looking at artefact dependencies instead. This is just what Paul has written about in his answer and is the correct approach.

    Regarding your update, it sounds like those post-build files are only available because they’re still on the build agent after the first build. Try running the first build then “cleaning sources” on the agent and running the second build. You’ll find the original compilation output is no longer there and it will fail. This is important because if you have multiple build agents or go some time between the two builds you simply can’t rely on the output that isn’t saved as artefacts still being there.

    And yes, the TeamCity documentation is confusing 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project that has several build configurations (FREE version, male-only, female-only, etc.).
I have a project which i need to build in two different configurations. One
Ok, so for my build configurations, I have Release32 and Release64. Each one being
Our Software project contains Perl, C & VC++ code. I am trying to set
I have many build configurations in TeamCity, each servicing a large project. In the
I have three custom build configurations { Dev, Qs, Prd }. So, I have
In my build configuration I have multiple project queues: Queue1, Queue2, ... Queue(N) I
I'm new to Qt Creator and I have several questions regarding multiple build configurations.
I have a solution with 2 projects cira_lib and md5_test. One project (cira_lib) is
I have a solution containing a lot of projects and installer projects. One project

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.