dotnet / dotnet/msbuild

New AssemblyDependencyResolver codepath differs from legacy behavior on version mismatch

Open
#7,568 0 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

In a new project create a `nuget.config` with these contents:

```xml










```

Then run `dotnet restore` using .NET SDK `7.0.100-preview.4.22222.1`.

Actual behavior:

```sh-session
❯ &"C:\Users\raines\Downloads\dotnet-sdk-7.0.100-preview.4.22222.1-win-x64\dotnet.exe" restore
Determining projects to restore...
S:\repro\dotnet\sdk\issues\23498\23498.csproj : error NU1301: Unable to load the service index for source https://api.n
uget.org/v3/index.json.
Retrying 'FindPackagesByIdAsyncCore' for source 'https://example.com/FindPackagesById()?id='Microsoft.NETCore.App.Ref
'&semVerLevel=2.0.0'.
Password decryption is not supported on .NET Core for this platform. The following feed uses an encrypted password: '
foo'. You can use a clear text password as a workaround.
Windows Data Protection API (DPAPI) is not supported on this platform.
```

This is effectively a recurrence of https://github.com/dotnet/sdk/issues/23498 caused by #7520--the new `AssemblyDependencyResolver` adopts the greater-than-or-equal version check much like #6993 wants, but that causes the NuGet scenario regression.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.