Search code examples
tfstfsbuildtfs-2015

Resolving dependencies in TFS 2015


I have two separate solutions in TFS 2015. We'll call them Solution1 and Solution2. The build for Solution1 creates an assembly which is required by Solution2. I'm not sure of the best way to handle this dependency in TFS.

Possible scenarios could include.

  • Each time Solution1 builds successfully it copies the new assembly to Solution2 which in turn triggers a build of Solution2 (is this possible in TFS? And if so, how?)
  • Each build of Solutiuon2 pulls the latest version of the assembly from Solution1

How have other people handled dependencies between TFS projects?


Solution

  • You should package the output of Solution 1 as a Nuget package and publish it to a Nuget repository. You can use a Network Share, MyGet, VSTS, or TFS 2017 as a Package Repo.

    Your second solution can then take a dependantsy on that Nuget Package and you choose when to update.

    If you want to update the packages automatically you can call something prior to Solution 2 build, like the pre-build step mentioned in comments.