You are not logged in.

#1 2024-06-18 22:45:49

nchoosek
Member
Registered: 2024-06-18
Posts: 2

[Solved] Dotnet restore fails to get index (times out)

Hi, I have tried every solution you can google for. Running dotnet restore returns this:

Restoring /home/name/test/test.csproj:
  Determining projects to restore...
/home/name/test/test.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.
ss/usr/share/dotnet/sdk/8.0.106/NuGet.targets(156,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [/home/name/test/test.csproj]
/usr/share/dotnet/sdk/8.0.106/NuGet.targets(156,5): error :   The HTTP request to 'GET https://api.nuget.org/v3/index.json' has timed out after 100000ms. [/home/name/test/test.csproj]
Restore failed.

I can curl https://api.nuget.org/v3/index.json, it responds without a problem.

I have reinstalled the dotnet stack, this is what I currently have:

$ pacman -Q | rg "dotnet"
dotnet-host 8.0.6.sdk106-1
dotnet-runtime 8.0.6.sdk106-1
dotnet-sdk 8.0.6.sdk106-1
dotnet-targeting-pack 8.0.6.sdk106-1

Any knowers?

Last edited by nchoosek (2024-06-19 19:57:30)

Offline

#2 2024-06-19 10:57:21

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,384

Re: [Solved] Dotnet restore fails to get index (times out)

A DuckDuckGo search for dotnet NU1301 gave https://stackoverflow.com/questions/731 … rce-https# .as first result .

It does look relevant, please check it.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building to complicated ?
Try clean chroot manager by graysky

Offline

#3 2024-06-19 19:57:06

nchoosek
Member
Registered: 2024-06-18
Posts: 2

Re: [Solved] Dotnet restore fails to get index (times out)

Okay, so running restore with --verbosity detailed gave more info:

Errors: MSB4276: The default SDK resolver failed to resolve SDK "Microsoft.NET.SDK.WorkloadAutoImportPropsLocator" because directory "/usr/share/dotnet/sdk/8.0.302/Sdks/Microsoft.NET.SDK.WorkloadAutoImportPropsLocator/Sdk" did not exist.

and

       Errors: MSB4276: The default SDK resolver failed to resolve SDK "Microsoft.NET.SDK.WorkloadManifestTargetsLocator" because directory "/usr/share/dotnet/sdk/8.0.302/Sdks/Microsoft.NET.SDK.WorkloadManifestTargetsLocator/Sdk" did not exist.
       The SDK "Microsoft.NET.SDK.WorkloadManifestTargetsLocator" was successfully resolved by the "Microsoft.DotNet.MSBuildWorkloadSdkResolver" resolver to location "/usr/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.android/34.0.43" and version "null".

I tried uninstalling and reinstalling the dotnet runtime/sdk from the official repo, older versions of packages from the official repo archives, as well as the binaries from the AUR. None of these helped. I finally uninstalled everything and installed using the official manual install script from Microsoft, which fixed the issues: https://learn.microsoft.com/en-us/dotne … ed-install.

Offline

Board footer

Powered by FluxBB