I have a project that uses an authenticated NuGet feed on Azure DevOps. I can restore NuGet packages in the solution just fine, but it seems when I try to use dotnet to restore it doesn't want to work. Here is what I type and what I get:
dotnet restore --interactive
Determining projects to restore...
C:\Users\...\MyProject.UnitTests.csproj : error NU1301: Unable to load the service index for source /.../nuget/v3/index.json. [C:\Users\..\MyProject.sln]
Failed to restore C:\Users\MyProject.UnitTests.csproj (in 6.85 sec).
4 of 5 projects are up-to-date for restore.
Obviously removed some parts of the path for security, but I verified that the path is correct and I can load it through a browser (and again, I can restore just fine through VS). The --interactive
option doesn't seem to make any difference. Why would this be inaccessible? I also tried installing the credentials manager but without any change.
Ultimately I'm trying to build a PowerShell script to build several configurations at once (and an installer, etc.). First though I need to have it build which does an automatic restore which is not working.
I have a project that uses an authenticated NuGet feed on Azure DevOps. I can restore NuGet packages in the solution just fine, but it seems when I try to use dotnet to restore it doesn't want to work. Here is what I type and what I get:
dotnet restore --interactive
Determining projects to restore...
C:\Users\...\MyProject.UnitTests.csproj : error NU1301: Unable to load the service index for source https://pkgs.dev.azure/.../nuget/v3/index.json. [C:\Users\..\MyProject.sln]
Failed to restore C:\Users\MyProject.UnitTests.csproj (in 6.85 sec).
4 of 5 projects are up-to-date for restore.
Obviously removed some parts of the path for security, but I verified that the path is correct and I can load it through a browser (and again, I can restore just fine through VS). The --interactive
option doesn't seem to make any difference. Why would this be inaccessible? I also tried installing the credentials manager but without any change.
Ultimately I'm trying to build a PowerShell script to build several configurations at once (and an installer, etc.). First though I need to have it build which does an automatic restore which is not working.
Share Improve this question asked Nov 20, 2024 at 21:03 sfaustsfaust 2,37332 silver badges70 bronze badges 1- 1 Why the close request? If this is answered elsewhere please point me to where, I couldn't find it... – sfaust Commented Nov 25, 2024 at 17:20
1 Answer
Reset to default -1You will need to get the NuGet credential provider from this repo https://github/microsoft/artifacts-credprovider and follow the instructions in the README.md file and see if that helps.
If it still doesn’t work, try building the application using visual studio and it should pop up a sign in screen.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742328332a4423201.html
评论列表(0条)