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
MediatR 2.0.0-beta-005
Comments
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/
.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).
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...
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.
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.
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.
Perfect, thanks!
The newest Beta of Linqpad5 has Nuget 3.0 support