Snapshot Dependency - how to configure when you need to rebuild

I have one MSBuild solution with 6 MSBuild projects/dlls and one project/exe.  Each dll/exe has its config embedded within the dll/exe (corporate policy).

I have one TeamCity project triggered on VCS change (Call it D).  It uses the Dev configs, builds the dlls and runs the unit tests.

I have another TeamCity project with a snapshot dependency (Do not run new build if there is a suitable one; Only use successful builds from suitable ones) on D (call it T).  It uses the Test configs, builds the dlls, and pushes to the test server.  I want T to use the same VCS changeset as D, but if someone else checks in some code after the checkin that fired off D but before D finishes building/testing, then if D finishes successfully T will fire but it will use the most recent changeset, and not the same one that D ran.

Can anyone suggest a way to configure TeamCity projects so that when T runs it will use the same code as D, even if there is a subsequent checkin?   Note that the artifact dependency doesn't appear to be applicable because of the embedded configs in the DLLs.


Comment actions Permalink


Which version of TeamCity do you use? Do both configurations use the same VCS root? How did you configure triggers?
Could you please also check on the build result Dependencies tab of any configuration that changes included in both builds are not the same? Please attach screenshots.

Comment actions Permalink

This was a silly mistake on my part.

We were using the wrong build.vcs.number in the build number of T, which caused us to think we were getting the wrong changeset.


Please sign in to leave a comment.