Open yhvicey opened 12 months ago
I had the same problem. Our project is done with .NET 7 and it has a private Nuget feed. I updated my VS to the latest version and didn't notice that it removed the .NET 7 SDK and only used .NET 8. When running dotnet restore --interactive
I also got the Response status code does not indicate success: 401 (Unauthorized).
error.
Started working when I explicitly used .NET 7 SDK to run that command. Also pipelines started working after adding the UseDotNet@2
task with the 7.x
.
Was helping a colleague with this problem after upgrading to the .NET 8 SDK. Re-installing the credential provider made it work.
Describe the bug
Run
dotnet restore --interactive
will not trigger authentication process when restoring projects with custom SDK from private NuGet feed.To Reproduce
global.json
):NuGet.config
with private NuGet feed for project:dotnet restore --interactive
against this projectExceptions (if any)
Further technical details
dotnet --info
.NET SDK: Version: 8.0.100-rc.2.23502.2 Commit: 0abacfc2b6 Runtime Environment: OS Name: Windows OS Version: 10.0.22631 OS Platform: Windows RID: win-x64 Base Path: C:\Program Files\dotnet\sdk\8.0.100-rc.2.23502.2\ .NET workloads installed: [maui-windows] Installation Source: VS 17.7.34221.43, VS 17.8.34302.71 Manifest Version: 8.0.0-rc.2.9530/8.0.100-rc.2 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100-rc.2\microsoft.net.sdk.maui\8.0.0-rc.2.9530\WorkloadManifest.json Install Type: Msi [maui-maccatalyst] Installation Source: VS 17.7.34221.43 Manifest Version: 8.0.0-rc.2.9530/8.0.100-rc.2 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100-rc.2\microsoft.net.sdk.maui\8.0.0-rc.2.9530\WorkloadManifest.json Install Type: Msi [maccatalyst] Installation Source: VS 17.7.34221.43, VS 17.8.34302.71 Manifest Version: 17.0.8477-net8-rc2.2/8.0.100-rc.2 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100-rc.2\microsoft.net.sdk.maccatalyst\17.0.8477-net8-rc2.2\WorkloadManifest.json Install Type: Msi [maui-ios] Installation Source: VS 17.7.34221.43 Manifest Version: 8.0.0-rc.2.9530/8.0.100-rc.2 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100-rc.2\microsoft.net.sdk.maui\8.0.0-rc.2.9530\WorkloadManifest.json Install Type: Msi [ios] Installation Source: VS 17.7.34221.43, VS 17.8.34302.71 Manifest Version: 17.0.8477-net8-rc2.2/8.0.100-rc.2 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100-rc.2\microsoft.net.sdk.ios\17.0.8477-net8-rc2.2\WorkloadManifest.json Install Type: Msi [maui-android] Installation Source: VS 17.7.34221.43 Manifest Version: 8.0.0-rc.2.9530/8.0.100-rc.2 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100-rc.2\microsoft.net.sdk.maui\8.0.0-rc.2.9530\WorkloadManifest.json Install Type: Msi [android] Installation Source: VS 17.7.34221.43, VS 17.8.34302.71 Manifest Version: 34.0.0-rc.2.479/8.0.100-rc.2 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100-rc.2\microsoft.net.sdk.android\34.0.0-rc.2.479\WorkloadManifest.json Install Type: Msi Host: Version: 8.0.0-rc.2.23479.6 Architecture: x64 Commit: 0b25e38ad3 .NET SDKs installed: 6.0.416 [C:\Program Files\dotnet\sdk] 7.0.403 [C:\Program Files\dotnet\sdk] 8.0.100-rc.2.23502.2 [C:\Program Files\dotnet\sdk] .NET runtimes installed: Microsoft.AspNetCore.App 6.0.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.0-rc.2.23480.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.24 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.0-rc.2.23479.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 6.0.24 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 8.0.0-rc.2.23479.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Other architectures found: x86 [C:\Program Files (x86)\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation] Environment variables: Not set global.json file: Not found Learn more: https://aka.ms/dotnet/info Download .NET: https://aka.ms/dotnet/download