Home

Can't install nuget v3.0 packages

I was trying to install the below nuget packages using v4.55.03 (and v5.00.06) and got the following exception "NuGet.NuGetVersionNotSatisfiedException". I submitted a couple of the exception windows that popped up but couldn't figure out how to copy the error text, but it said something about System.Threading.Tasks.4 needing nuget client 3.0 or above. Anybody got a workaround?
MediatR 2.0.0-beta-005

Comments

  • Unfortunately, NuGet 3 is a complete re-write. This means I have to re-write the NuGet support in LINQPad, too. This will take a while. As far as I can see, there are not even examples yet on how to get started with the new API.
  • @JoeAlbahari, you don't actually need NuGet 3.0 (despite what the error message says). NuGet 2.8.6 supports NuGet 3.0 packages, which makes it possible to use these packages in VS2013.
  • That would be awesome. Will look into it tomorrow.
  • Hi, is there any update on this issue?

    I'm getting the "NuGet.NuGetVersionNotSatisfiedException — The 'Microsoft.CSharp 4.0.0' package requires NuGet client version '3.0' or above, but the current NuGet version is ''2.8.50926.602'." error while trying to add AutoMapper in LINQPad 5.02.03 (AnyCPU).

    Off topic: you can find the packages (directly) depending on Microsoft.CSharp 4.0.0 by running the following query in LINQPad against https://www.nuget.org/api/v2/.
    Packages
    .Where(a =>
    a.Dependencies.Contains("Microsoft.CSharp:4.0.0")
    && a.IsLatestVersion)
    .OrderBy(a => a.Id)
  • The LINQPad beta released a few hours ago uses NuGet 2.9.0, but this doesn't appear to fix the problem. It looks like I will have to migrate LINQPad to NuGet 3.0, which is a non-trivial exercise.
  • I'll go and have a look at the beta.

    If anyone is interested, the following query will list every package directly requiring the new NuGet version (currently 122 packages, if I didn't screw up anything, and the packages depending on any one of them are not listed, e.g. the aforementioned AutoMapper).
    Packages
    .Where(a =>
    a.IsLatestVersion
    && a.MinClientVersion != null
    && a.MinClientVersion != "0.1"
    && a.MinClientVersion != "0.0.1"
    && a.MinClientVersion != "0.0.2"
    && a.MinClientVersion != "1.0"
    && a.MinClientVersion != "1.0.0"
    && a.MinClientVersion != "1.0.0.0"
    && a.MinClientVersion != "1.0.0.1"
    && a.MinClientVersion != "1.0.0.3"
    && a.MinClientVersion != "1.0.0.5"
    && a.MinClientVersion != "1.0.0.6"
    && a.MinClientVersion != "1.0.1"
    && a.MinClientVersion != "1.0.2"
    && a.MinClientVersion != "1.0.2.1"
    && a.MinClientVersion != "1.0.2.2"
    && a.MinClientVersion != "1.0.6"
    && a.MinClientVersion != "1.1"
    && a.MinClientVersion != "1.1.0"
    && a.MinClientVersion != "1.1.2"
    && a.MinClientVersion != "1.2"
    && a.MinClientVersion != "1.2.0"
    && a.MinClientVersion != "1.2.0.2"
    && a.MinClientVersion != "1.5"
    && a.MinClientVersion != "1.7"
    && a.MinClientVersion != "2.0"
    && a.MinClientVersion != "2.0.0"
    && a.MinClientVersion != "2.0.0.0"
    && a.MinClientVersion != "2.0.0.46"
    && a.MinClientVersion != "2.0.0.48"
    && a.MinClientVersion != "2.0.1.1"
    && a.MinClientVersion != "2.0.2"
    && a.MinClientVersion != "2.0.10"
    && a.MinClientVersion != "2.0.30625.9003"
    && a.MinClientVersion != "2.1"
    && a.MinClientVersion != "2.3"
    && a.MinClientVersion != "2.5"
    && a.MinClientVersion != "2.6"
    && a.MinClientVersion != "2.7"
    && a.MinClientVersion != "2.7.0"
    && a.MinClientVersion != "2.7.2"
    && a.MinClientVersion != "2.7.40808.167"
    && a.MinClientVersion != "2.8"
    && a.MinClientVersion != "2.8.0"
    && a.MinClientVersion != "2.8.1"
    && a.MinClientVersion != "2.8.3"
    && a.MinClientVersion != "2.8.5"
    && a.MinClientVersion != "2.8.6"
    && a.MinClientVersion != "2.8.50313")
    .OrderBy(a => a.Id)
  • The LINQPad beta released a few hours ago uses NuGet 2.9.0, but this doesn't appear to fix the problem.
    Indeed... I don't really understand why, because VS2013 with NuGet 2.9 is able to use v3 packages.

    I think it might be because LINQPad tries to retrieve all dependencies, even those that are not really necessary. For instance, I have a package named NString (no MinClientVersion), which has a dependency on System.Collections.Immutable (MinClientVersion = 2.8.6), which itself has dependencies on a few v3 packages, but only when targeting "DotNET 5.0". But LINQPad queries only target the full .NET Framework, for which this package has no dependencies...
  • Actually I just realized that my package also has dependencies on v3 packages, but, again, only when targeting the "dotnet" or "uap" platforms. The problem remains the same, though: since LINQPad only targets the full .NET Framework, it shouldn't download those dependencies.
  • This should now fixed with the latest beta:
    www.linqpad.net/download.aspx#beta

    The new beta uses the NuGet V3 client library. As that library is not a drop-in replacement for V2, some things have had to be re-coded. Let me know if anything is broken - such as support for proxies / credentials / custom feeds, etc.
  • Thanks Joe! It seems to work fine with the official NuGet feed, and with an non-authenticated custom feed. I haven't tried with an authenticated feed or with a proxy, though.

    I see just one issue, though: LINQPad downloads the dependencies for each package separately. If I have two packages A and B that both depend on packages C and D, A and B will each have their own copy of C and D. It makes it longer than necessary to install new packages. Also, I believe it could lead to issues if A and B depend on different versions of C and D. When used from Visual Studio or from the command line, NuGet downloads each package only once.
  • This is necessary because LINQPad has a single package cache that operates across all queries. So, once you've downloaded a package, you can use it again with other queries by selecting it directly from the local package cache. This is not the case with Visual Studio: whenever you create a new solution, you hit the NuGet server again to search/add packages.

    As a result, LINQPad must keep each package "sterile": its dependencies must not be influenced by other packages that you happened to have downloaded at the same time.

    Regarding the problem of having A and B depend on different versions of C and D, LINQPad knows about this and resolves any conflicts using the same semantics as the standard NuGet package manager.
  • This is not the case with Visual Studio: whenever you create a new solution, you hit the NuGet server again to search/add packages.
    Well, it depends, actually. If you use the old packages.config model, there is indeed one package cache per solution. But with the new project.json model, there is a single global cache (in %USERPROFILE%\.nuget).
    Regarding the problem of having A and B depend on different versions of C and D, LINQPad knows about this and resolves any conflicts using the same semantics as the standard NuGet package manager.
    Perfect, thanks!
  • To anyone who find this discussion through google...

    The newest Beta of Linqpad5 has Nuget 3.0 support
  • I have LinqPad 4... does this mean I have to upgrade to v5 in order to get past this exception?
Sign In or Register to comment.