0

I am trying to install a version of a dotnet tool and it works for older versions but for the latest version, for some reason, it just won't install

dotnet new tool-manifest
dotnet tool install foo --version 2.0.0 // this doesn't work
dotnet tool install foo --version 1.1.1 // this works, same feed both hosted on Azure DevOps Artifacts

The same nuget.config file is present in the repo. The only difference is the version number. I can confirm both versions exist on our Artifacts.

error NU1301: Unable to load the service index for source '...'
The tool package couild not be restored.
Tool 'foo' failed to install. This failure may have been caused by:

* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET Core tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.
1
  • I don't think so as this is just something that maybe we did on our end by accident Commented Feb 20, 2024 at 21:02

1 Answer 1

0

I found out the issue. Since this is a different feed that is not in the same organization, I created a service connection in Azure DevOps to connect to this feed. Seems like the PAT may have been broken (maybe deleted by accident or wrong scopes?). I generated a new token and used it and it fixed the issue. I believe the reason the old version was working is because the Azure DevOps self hosted build agent already had the tool cached.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.