In Azure we have an pipeline which restores the nuget-packages of our C#-solution:
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: '$(solution)'
feedsToUse: 'select'
vstsFeed: 'xxxxxxxxxxxxxxx'
includeNuGetOrg: true
The pipeline has always run smoothly so far. One day, however, we get the following error messages in the console:
##[error]The nuget command failed with exit code(null) and error()
##[error]Packages failed to restore
Has anyone an idea what´s wrong?
It seems the latest version of nugetCommand2 is broken - have seen a github thread for it
revert your command to the latest working version - for us its - 2.238.1
so your command would be
- task: [email protected]
inputs:
command: 'restore'
restoreSolution: '$(solution)'
feedsToUse: 'select'
vstsFeed: 'xxxxxxxxxxxxxxx'
includeNuGetOrg: true
There is a GitHub issue has reported the same problem occurs on the latest version (2.244.1
) of NuGetCommand
task. Looks like, there is defect on the task version 2.244.1
.
As mentioned in the GitHub issue, you can force specify the task to a previous version that can work fine. For example.
- task: [email protected]
inputs:
command: 'restore'
restoreSolution: '$(solution)'
feedsToUse: 'select'
vstsFeed: 'xxxxxxxxxxxxxxx'
includeNuGetOrg: true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With