TeamCity sometimes building incorrectly

77 views Asked by At

I have TeamCity set up to build some Visual Studio solutions and package them into an artifact. This works just fine most of the time.

However, once in a while (maybe 1 in 100 builds), the files built from TeamCity does not run. We use a lot of dependency injection in our code and some times our application refuses to start because it can't find the correct dependencies in the files. There are no missing files in the artifact, though.

We then force TeamCity to build everything once more (by adding a new line to a file and commiting it), and suddenly our application starts again.

It is then obvious to me that there is something TeamCity has not built correctly, though I'm unable to discover what it is, as all the build logs report no errors or warnings of any kind.

What can cause this strange behavior, and what can I do to prevent it from happening in the future (or what can I turn on to get more extensive logging to try to find out what happens when it fails)?

1

There are 1 answers

2
hyprsleepy On

Check the errors when Team City does not run. Does it say why it cannot run? Sometimes have Team City fail a build simply because the version control system had a hiccup. Based on the error in Team City's log it can be obvious that it was only because of that. If you do not do clean builds try doing that and seeing if it makes the intermittent problems go away.