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

Older versions are not downloaded but are needed by the Nuget Package Manager #2

Open
chrisstankevitz opened this issue Jul 22, 2019 · 0 comments

Comments

@chrisstankevitz
Copy link

See my post at https://stackoverflow.com/questions/57116073/nuget-exe-and-nuget-package-manager-resolve-different-dependencies/57150898#57150898

I don't know how Nuget works under the covers -- but the NGDD does not fetch some older deps that are supposedly satisfied by later versions (e.g. Microsoft.AspNetCore 1.1.x is not downloaded because another dep from another targeted framework already fetched Microsoft.AspNetCore 2.0.x).

This is a problem when the packages are brought over to an offline system and installed with NuGet Package Manager which sometimes demands the older 1.1.x packages. I don't know why the NPM is not satisified with 2.0.x when supposedly >= 1.1.x is required.

To "fix" the "problem" I modified GetRangedPackageVersion:

    private IPackage GetRangedPackageVersion(IQueryable<IPackage> packages, IVersionSpec versionSpec)
    {
      packages = packages.Where(o => o.Version == versionSpec.MinVersion);

      IPackage package = packages
          .OrderByDescending(o => o.Version)
          .FirstOrDefault();

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

No branches or pull requests

1 participant