-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotnet restore project with failing RestoreAdditionalProjectSources hangs with net8 #13991
Comments
I've attached sample project. The problem is:
|
There's no priority of sources. They're combined prior to any calls being made.
|
By default it runs over 1.5 hours. I killed the proccess after that. |
The biggest challenge is that url seems to be accepting the connection but not returning any data, leading to a long wait client side. |
|
Did you validate this assumption? If so, I'm curious to learn more. Source inaccessible issues are
I want to make sure I understand this. If a source cannot be reached, there's no guarantee a restore will be correct. |
https://github.com/NuGet/NuGet.Client/blob/4e10b1165316e09b6570e51b4316d88b493889e9/src/NuGet.Core/NuGet.Protocol/Providers/ServiceIndexResourceV3Provider.cs#L73
project.assets.json is missing and further build fails |
There's a higher level caching.
This suggests to me that the restore did not complete. Even with a source failure, starting with https://learn.microsoft.com/en-us/nuget/release-notes/nuget-6.3, the assets file should be created. |
Well. |
NuGet Product Used
dotnet.exe
Product Version
dotnet 8.0-9.0
Worked before?
dotnet 6.0
Impact
None
Repro Steps & Context
I have following project:
Note that
RestoreAdditionalProjectSources
contains sources that are no longer available.when I run
dotnet restore NugetDemo.sln --packages Packages
with dotnet 8 or 9 I get a lot ofNU1301
errors and restore process never stops. The same happens when I run build from Visual Studio, but VS has timeout 10 minutes and kills restore process after that.If I specify
--ignore-failed-sources
option nothing changes but error turns into warning.when I run the same command with dotnet 6 everything works fine and restore process completes successfully.
NOTE:
Packages
folder must be empty.Sample solution attached.
My understanding is that
RestoreAdditionalProjectSources
should add additional package sources to look for packages not found in existing sources. And if all packages are found in existing sources then no request to additional ones should be made at all.I was able to build some old unsupported projects with net6 but with net8 and higher - I can't.
NugetDemo.zip
Verbose Logs
No response
The text was updated successfully, but these errors were encountered: