How do you restore NuGet packages in a build pipeline? Answer: Use either: - script: dotnet restore or - task: NuGetCommand@2 inputs: command: 'restore' This pulls dependencies from NuGet.org or an internal feed. Example: If your project uses private packages, you can add a NuGet service connection or Azure Artifacts feed to authenticate.
How do you restore NuGet packages in a build pipeline?
Answer:
Use either:
- script: dotnet restore
or
- task: NuGetCommand@2
inputs:
command: 'restore'
This pulls dependencies from NuGet.org or an internal feed.
Example:
If your project uses private packages, you can add a NuGet service connection or Azure
Artifacts feed to authenticate.