4

I have a Visual Studio 2015 solution with 3 C# projects that depend on each other:

Project A -> Project B -> Project C

I would like each of these projects to have their own independently versioned NuGet packages in TeamCity. I also would like to automatically build and publish NuGet packages for downstream projects.

For example, assuming all projects start at version 1.0.0.1, if Project A is updated from v1.0.0.1 to v1.0.0.2, then Project B should be incremented to v1.0.0.2 and rebuilt to reference Project A v1.0.0.2, which in turn triggers Project C to be incremented to v1.0.0.2 and rebuilt to reference Project A v1.0.02 and Project B v1.0.02.

But if Project C is updated from v1.0.0.2 to v1.0.0.3 in isolation, then neither Project A nor Project B should be built and their versions numbers should not be incremented.

I am aware of the -IncludeReferencedProjects NuGet option, but I am not sure how to prevent TeamCity from patching the AssemblyVersionInfos of upstream projects.

Is there a good way to do this in TeamCity or is there an alternative solution to my problem?

user1777663
  • 155
  • 1
  • 6

0 Answers0