dotnet-outdated: Cannot connect to a private nuget server (Azure DevOps)

I have tried to run dotnet outdated but it does not work on my computer. I have dotnet SDK 5.0.100 and the latest version of the tool 3.1.0. I also have the latest version of Microsoft.NuGet.CredentialProvider

Errors occurred while analyzing dependencies for some of your projects. Are you sure you can connect to all your configured NuGet servers? Unable to find DOTNET_HOST_PATH environment variable. If you use credential providers for your NuGet sources you need to have this set to the path to the dotnet executable.

I can set manually DOTNET_HOST_PATH but it still cannot connect to my private nuget source server :

$Env:DOTNET_HOST_PATH = "$env:ProgramFiles\dotnet\dotnet.exe"

Errors occurred while analyzing dependencies for some of your projects. Are you sure you can connect to all your configured NuGet servers?

Nuget server was added with the dotnet nuget add source command (with username and PAT token as password). The dotnet command dotnet list package --outdated works well.

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 5
  • Comments: 18 (3 by maintainers)

Most upvoted comments

The problem still occurs in Azure Pipelines. I have also tried, as suggested by @PartTimeLegend to add the Nuget Authenticate step before this but I keep getting the following error for my private feeds in Azure Devops:

Errors occurred while analyzing dependencies for some of your projects. Are you sure you can connect to all your configured NuGet servers?

Unable to find DOTNET_HOST_PATH environment variable. If you use credential providers for your NuGet sources you need to have this set to the path to the `dotnet` executable.

Any suggestions on how to fix this?

On my private vsts agent, dotnet executable is located under /usr/bin/dotnet So you may be able to hard set the env variable, that should fix it.

variables :
  DOTNET_HOST_PATH: '/usr/bin/dotnet'