Skip to content
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

New AssemblyDependencyResolver codepath differs from legacy behavior on version mismatch #7568

Open
rainersigwald opened this issue Apr 22, 2022 · 0 comments
Labels

Comments

@rainersigwald
Copy link
Member

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

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <!--To inherit the global NuGet package sources remove the <clear/> line below -->
    <clear />
    <add key="foo" value="https://example.com" />
  </packageSources>
  <packageSourceCredentials>
    <foo>
        <add key="Username" value="[email protected]" />
        <add key="Password" value="..." />
    </foo>
</packageSourceCredentials>

</configuration>

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

Actual behavior:

&"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 dotnet/sdk#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants