We have a teamcity with build configuration "Build (Trunk)" and "Deploy CI (Trunk)".
The "Build (Trunk)" has a VCS trigger "Triggers a build after a VCS check-in is detected" and its goal is to build the assemblies for deploy.
The "Deploy CI (Trunk)" has a Finish Build Trigger "Wait for a successful build in: Build (trunk)" and depends on the "Build (Trunk)" with an option "Run build on the same agent".
Sometimes the "Build (Trunk)" succeeds, the dlls are there (there is a build step that checks that) and "Deploy (Trunk)" fails because it is missing some dll for the deploy that was already build (and checked).
I end up with an error in the "Deploy (Trunk)" [MSBuild.ExtensionPack.Framework.Assembly] D:\TeamCity\buildAgent\work\d11b43f69b1be1cb\Source\Product\Build.xml(191, 9): File not found: D:\TeamCity\buildAgent\work\d11b43f69b1be1cb\Source\Product\output\Release\Application\Server\bin\Product.Server.dll
The dlls are there at the end of "Build (Trunk)" but somehow are missing in "Deploy (trunk)". Same issue occurs for another build configurations (unit tests).
When this happen, I generally run Build (Trunk) wit "clean all files in the checkout directory before the build" and it works. We are currently using TeamCity 10, but it happened on the TeamCity 9.
I have no idea how to determine the root cause and would like an advice on that.