✅ dotnet restore failed - unable to load service index

I'm not sure this is the right place to ask, but I am #suffering. An issue I've been trying to solve for ~1 year. The title says it all - no seriously, that's all I get. No certificate verification errors, no errors accessing target. I've read through the dotnet restore -v diag text and there's nothing indicating it was going to fail. I'll include an excerpt below. I'm running on Zorin OS 16, built on Ubuntu 20.04. Both dotnet6.0, dotnet7.0 fail, installed from the apt source https://packages.microsoft.com/ubuntu/20.04/prod. Installing the nuget package and running nuget restore fails with the same error. Deleting the default nuget.config file so it regenerates doesn't work. I'm able to access https://api.nuget.org/v3/index.json from my browser. echo | openssl s_client -servername api.nuget.org -connect api.nuget.org:443 2>/dev/null says Verification: OK
Restoring packages for /**/test.csproj... (TaskId:36)
Restoring packages for .NETCoreApp,Version=v7.0... (TaskId:36)
Resolving conflicts for net7.0... (TaskId:36)
00:26:05.638 1>/**/test.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.
Checking compatibility of packages on net7.0. (TaskId:36)
All packages and projects are compatible with net7.0. (TaskId:36)
Checking compatibility of packages on net7.0 (browser-wasm). (TaskId:36)
All packages and projects are compatible with net7.0 (browser-wasm). (TaskId:36)
Committing restore... (TaskId:36)
Writing assets file to disk. Path: /**/obj/project.assets.json (TaskId:36)
Writing cache file to disk. Path: /**/obj/project.nuget.cache (TaskId:36)
Persisting dg to /**/obj/test.csproj.nuget.dgspec.json (TaskId:36)
Failed to restore /**//test.csproj (in 111 ms). (TaskId:36)
Restoring packages for /**/test.csproj... (TaskId:36)
Restoring packages for .NETCoreApp,Version=v7.0... (TaskId:36)
Resolving conflicts for net7.0... (TaskId:36)
00:26:05.638 1>/**/test.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.
Checking compatibility of packages on net7.0. (TaskId:36)
All packages and projects are compatible with net7.0. (TaskId:36)
Checking compatibility of packages on net7.0 (browser-wasm). (TaskId:36)
All packages and projects are compatible with net7.0 (browser-wasm). (TaskId:36)
Committing restore... (TaskId:36)
Writing assets file to disk. Path: /**/obj/project.assets.json (TaskId:36)
Writing cache file to disk. Path: /**/obj/project.nuget.cache (TaskId:36)
Persisting dg to /**/obj/test.csproj.nuget.dgspec.json (TaskId:36)
Failed to restore /**//test.csproj (in 111 ms). (TaskId:36)
3 Replies
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
dadarkwizard
dadarkwizardOP2y ago
I switched to Ubuntu 22.04 and didn't have this issue so 🤷‍♂️
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server