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

When specific nuget version is needed by a package it is the chocolatey version that is used #194

Closed
laedit opened this issue Mar 23, 2015 · 12 comments

Comments

@laedit
Copy link
Contributor

laedit commented Mar 23, 2015

I was trying to update xunit with the following command:

choco install xunit -source https://nuget.org/api/v2/ --force -version 2.0.0

And I am getting this result:

xunit not installed. An error occurred during installation:
The 'xunit 2.0.0' package requires NuGet client version '2.8.1' or above, but the current NuGet version is '0.9.9.2'.
xunit install not successful.

Here are the logs.
The version of Powershell is:

Major  Minor  Build  Revision
-----  -----  -----  --------
4      0      -1     -1

Sorry if this is a duplicate, I haven't found any related issues.

@gep13
Copy link
Member

gep13 commented Mar 23, 2015

Interesting....

This is due to an addition to the nuspec file here:

image

And Chocolatey is reporting it's own version number, not the version number of the underlying nuget.core engine.

Is there a specific reason that you are installing a nuget package using Chocolatey though? Chocolatey is intended for installing applications, not DLL's hosted on nuget.org.

@laedit
Copy link
Contributor Author

laedit commented Mar 23, 2015

I wanted to install the xunit console runner v2 which is not available right now on chocolatey.
So it's the wrong package, there is a dedicated one for the console runner but it require at least the v2.8.1 of Nuget too.

@gep13
Copy link
Member

gep13 commented Mar 23, 2015

Ah, I see. We will have to wait and see what @ferventcoder's thoughts on this one are, as I don't have any good suggestions.

@ferventcoder
Copy link
Member

Wow, that's pretty messed up that it doesn't check nuget's version... only the client caller. I wonder if there is a way to ignore that.

@ferventcoder
Copy link
Member

Bug in NuGet that is, but we need to workaround it.

@ferventcoder ferventcoder added this to the 0.9.9.7 milestone May 11, 2015
@ferventcoder
Copy link
Member

I'm not seeing this error in 0.9.9.6.

I am seeing this in 0.9.9.6, but not when I run the latest stable code. Not sure what the difference is, perhaps debug/release.

@ferventcoder
Copy link
Member

http://nuget.codeplex.com/SourceControl/latest#src/Core/PackageWalker/PackageWalker.cs : CheckPackageMinClientVersion(IPackage package)

http://nuget.codeplex.com/SourceControl/latest#src/Core/Packages/Constants.cs
public static readonly Version NuGetVersion = typeof(IPackage).Assembly.GetName().Version;

@ferventcoder
Copy link
Member

The difference is, once Nuget.Core is ILMerged in, the version of the assembly is switched over to Chocolatey's assembly version.

@laedit
Copy link
Contributor Author

laedit commented Jun 8, 2015

Excellent, thanks!

@ferventcoder
Copy link
Member

Still need to tell NuGet not to care about that.

@ferventcoder
Copy link
Member

This is fixed and will be released with 0.9.9.7.

ferventcoder added a commit that referenced this issue Jun 12, 2015
Vendoring NuGet.Core allows us to take advantage of our own fixes to
the provider. There are things that have been wanted for awhile that
don't have a workaround to change the setting.

- GH-290 - packages no longer have a restriction on content folders
that produces the "External packages cannot depend on packages that
target projects". I'd like to call it a bug, and for Chocolatey it
certainly is.
- GH-194 - Fix minimum NuGet client version reports Chocolatey version
instead of NuGet's version, which is fine for packages on Chocolatey,
but the ones on NuGet usually have this filled in, which makes them
impossible to install with choco.
- GH-205 - Enhance the nuspec - first wave. Add the most oftenly
requested url for the nuspec, the packageSourceUrl and several other
urls plus add in replaces, provides and conflicts as placeholders for
now.
ferventcoder added a commit that referenced this issue Jun 12, 2015
* stable:
  (GH-205) Enhance the nuspec template
  (GH-205)(GH-194)(GH-290) Vendor NuGet.Core
ferventcoder referenced this issue in chocolatey/nuget-chocolatey Jun 12, 2015
If you don't set it specifically, ILMerge will produce a different
version of the IPackage value.
@mgiammarco
Copy link

Sorry I need to reopen this ticket.
I have received this message during installation of a software with chocolatey:

The 'Microsoft.NETCore.Platforms 3.0.0' package requires NuGet client version '2.12' or above, but the current NuGet version is '2.11.0.0'.

So please tell me how to solve it.
Thanks,
Mario

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

No branches or pull requests

4 participants