2

Is there a way to run the sequence of a build definition locally, without having to push changes to the repository and have the build trigger?

Currently, I have a simple build definition with only a couple of steps that I can run manually, but I plan on adding more steps to the sequence and ideally would like to run them all at once.

Similar question: Drone.io build locally without pushing to the repo

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Heidi
  • 31
  • 2

1 Answers1

2

If you need to build your project locally without pushing to a remote repository, the tasks in the VSTS build definition can not be used. You need to build each steps manually by the related CLI or related software.

Assume in your VSTS build definition, there is the tasks as below:

  • NuGet restore
  • Visual Studio Build

In order to build locally, you need to use execute the below steps manually:

  • Use the NuGet CLI, nuget.exe /path/to/project restore to work as the NuGet restore step in VSTS build.
  • Use the MSBuild CLI, msbuild /path/to/project [arguments] or build in Visual Studio to work as Visual Studio Build step in VSTS build.
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Marina Liu
  • 36,876
  • 5
  • 61
  • 74