Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

How to specify which version of nuget.exe to use with self-hosted agent in Azure DevOps?

$
0
0

I'm running self-hosted agent and NuGetToolInstaller was always throwing an error ERR:unable to get local issuer certificate.

I found a fix-hack here. Just to download needed nuget.exe version to the machine, add it to Environment Variables and remove NuGetToolInstaller at all. It fixed the issue, but today I understood that it's not really so.

Currently, I have nuget.exe version 5.6.0 so I thought self-hosted agent uses it but...

While running Initialize Job Azure downloads NuGetCommand

enter image description here

I found the location and can see that it downloads three different versions of nuget.exe

enter image description here

And it always uses 4.1.0 for any NuGetCommand.

enter image description here

How can I specify which version of NuGet to use without NuGetToolInstaller?

Or how to make Initialize Jobnot downloading any nuget.exe and just use that one available in the system?

For testing I deleted everything from the yaml and it looks like this:

trigger:- masterpool:  name: somePool    jobs:- job: someJob    variables:      solution: '**/*.sln'      buildPlatform: 'Any CPU'      buildConfiguration: 'Release'  steps:    - task: NuGetCommand@2      inputs:        restoreSolution: '$(solution)'

Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>