TeamCity/MSBuild ignores succesfull build of referenced solution

Answered

Hi everyone,

I have two c# solutions, first solution is a dll and the second solution is a windows application that references the dll file as an project reference.
The solutions have a custom VCS checkout directory so that the referencing of the dll solution still works in teamcity. I also have triggers that start a build when I commit to one of the solutions. For both solutions I'm using the AssemblyInfo patcher to generate file version numbers for each build.

So this works all fine. I trigger a build of the dll file, it patches the AssemblyInfo with a new version (ie. 1.2.3) and it builds the dll. After that a build of the application that depends on the dll is triggert. BUT this thime the build process builds a new dll and does not use the already build one with the patched AssemblyInfo. The second solution builds also without any problems, but the file version of the dll file is then 1.0.0 because of the rebuild.

How can I tell teamcity to use the existing build of the first solution and do not build a new one when the second solution build starts so that the file version information that was patched in the build of the first solution stays intact.

I also configured snapshot dependencies with the option "Do not run new build if there is a suitable one" enabled but this seams to be getting ignored.

6 comments
Comment actions Permalink

Hi Stefan, sorry for the late reply.

If I understand correctly, your application build configuration depends on the dll build configuration. And the problem you are having is that when you manually trigger the dll build, the application build does not re-use the existing dll build. Please correct me if I'm wrong.

How exactly do you run the build with the AssemblyInfo with a new version when you run it manually? Do you trigger it via '...' button and maybe redefine some of the parameters to reflect the new version?

0
Comment actions Permalink

Hi Mikhail,
thanks for your reply, I totaly forgot about this post.
I've tried to run the build manualy and by trigger and redefined the projects but nothing helped.
I left it there because it was not usefull for us. Then I saw that a update to version 2020.1 was released and I installed it.
Now it works. I changed nothing. I don't understand it but it works.

0
Comment actions Permalink

Hi Stefan,

That's curious. It sounds like there was a bug that was fixed in 2020.1. Which version did you have before the upgrade?

0
Comment actions Permalink

Hi Mikhail,

I'm not exactly shure. The last backup that was created from the update script is from 21. Februar 2020, so it should have been 2019.2.

0
Comment actions Permalink

Hi Stefan,

I went through the release notes, and it doesn't look like there was any bug of that sort.

There are some conditions to be met for a build to be considered suitable for re-use. I would assume that some of these conditions were not met earlier, which is why the builds were not re-used. Should the problem re-appear, please click the "Submit a request" button at the top of the page and attach full build logs, screenshots of the "Overview", "Changes", and "Dependencies" tabs of a build that was not re-used and a build that was executed instead of the first one. We will also need several internal artifacts from both builds in question: digest.txt from .teamcity/settings/, and build.start.properties.gz, build.finish.properties.gz from .teamcity/properties/. You can find these artifacts by clicking "Show hidden artifacts" link on the "Artifacts" tab.

0
Comment actions Permalink

Hi Mikhail,
thanks for your help, if the problem does re-appear I will follow your instructions and submit a full request with the needed additional informations.

0

Please sign in to leave a comment.