问题
I am getting error while restoring package from my Azure Artifacts Feed. How I do is , I have one nuget.config file(which contains url for my Azure artifacts feed and credentials) which I am calling from nuget.exe from my build machine.
Problem is , From the same network's build machine this process is working fine. From another network's machine also packages are getting restored except one, for only one package I am getting an error here.
Error-
Errors in packages.config projects
Unable to find version '1.1.32.1' of package 'MyPackage'.
https://MyOrg:8080/tfs/MyProj/_packaging/MyFeed/nuget/v3/index.json: Error downloading 'MyPackage.1.1.32.1' from 'https://MyOrg.
56c70b71-9921-40e7-968e-1234567cfe4d/nuget/v3/flat2/MyPackage/1.1.32.1/MyPackage.1.1.32.1.nupkg'.
The HTTP request to 'GET https://MyOrg:8080/tfs/MyProj/_packaging/56c70b71-9921-40e7-968e-1234567cfe4d/nuget/v3/flat2/MyPackage/1.1.32.1/MyPackage.1.1.32.1.nupkg' has timed out after 100000ms.
What I tried -
Checked with Disabling parallel processing.
Able to browse feed's url from all the build machines(also from another network's build machine)
Checked nuget.exe version 3.5.0/4.1.0/5.5.1
Deleted all nuget cache and checked again.
Can anyone help with this ?
回答1:
You can also try:
Use
dotnet restore
if your projects target.net core
. See note hereUse the .NET Core task, which has full support for all package scenarios currently supported by dotnet, including restore, pack, and nuget push.
Check the feed and make sure it do exist valid
1.1.32.1
version of the package there.Use Feeds I select here option to check if it makes any difference(I guess maybe this issue has something to do with your
nuget.config
file):
来源:https://stackoverflow.com/questions/61248102/nuget-package-failed-to-restore-with-the-error-the-http-request-has-timed-out