Search code examples
command-linevisual-studio-2017tfsbuildpackage-management

Command to update packages repo in PackageManager console


I need to update package repo before building a solution in TFS Build Definition. I want to implement this using CommandLine build task. Could someone tell me how to write a command to update package repo using a path.


Solution

  • According to your prior question, there are just missing some external packages during your TFS build pipeline.

    Usually TFS use Package Management that hosts NuGet, npm, and Maven packages alongside all your other TFS assets: source code, builds, releases, etc, also be able to handle the external packages.

    You could directly add external packages to a TFS Package Management feed. When you restore the packages, select the feed. All need packages will be restored entirely. To achieve this, just use Push NuGet packages to specify the packages you want to publish and the target feed location.

    More details please refer Get started with NuGet Package Management in TFS