Build API - Restore nuget packages

547 Views Asked by At

I created an app that builds all the solutions I have using the Build API (https://msdn.microsoft.com/en-us/library/dn715758(v=vs.121).aspx).

The problem I am facing, is that it does not trigger the nuget package restore. Which means that if it's the first time someone is building the source code, or a package has been updated by someone else, it does not automatically update/trigger the package restore on build.

Can't find anything in the documentation, maybe someone else knows something?

2

There are 2 best solutions below

3
On

I believe you will have to execute the restore command separately.

https://docs.nuget.org/consume/command-line-reference#restore-command

1
On

In the solution explorer (where you see your solution and all projections) right click on the solution, not on the project.

In the context menu you'll see

Enable Nuget Package Restore