NuGet version vs nuget CLI version? - nuget

I'm currently learning about NuGet, and there is something I just can't figure out: Is the NuGet version (which currently ranges from 1.x to 6.x) is the same as the Nuget.exe version? If not, what is the meaning of the NuGet version, and how do I know which versions of the CLI are compatible with which versions of NuGet?

Related

nuget “-Allversions” is invalid

I am migrating all packages from nuget. Server to Baget and I have a problem:
I used the nuget list command in the migration. But I found that the -allversions parameter does not list all package versions.
what should I do, my Baget server only has the latest package. How can I migrate all versions of all packages?
I use version of 5.1 nuget cli

'System.Net.Http 4.0.0' package requires NuGet client version '3.0' or above

Using team city as our CI and I've started getting this error message. We've obviously updated System.Net.Http recently which now needs a new version of NuGet. How do I get team city to find the new NuGet version. I've tried installing VS2015 and updating NuGet package manager through there. I've tried pointing directly to the command line nuget.exe (Don't know if that's been updated to v3?)
[restore] The 'System.Net.Http 4.0.0' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60717.93'.
[restore] Process exited with code 1
Do I just have to just wait till MS pushing the new nuget package to nuget?
Thanks
On your teamcity client you can configure the nuget versions available to your build agents.
Go to Administration -> Integrations -> NuGet
From this screen you can click Fetch NuGet and retrieve the latest version. Then you should be able to specify that version on your build step.
Download NuGet 3.1 from this url:
http://dist.nuget.org/win-x86-commandline/v3.1.0-beta/nuget.exe
Then put that on your build server, put the directory in your path, and run your NuGet build steps as "Command Line" commands in TeamCity, using NuGet.exe.
I think you need TeamCity 9.1, as that version contains the VS2015 build tools: https://confluence.jetbrains.com/display/TCD9/What%27s+New+in+TeamCity+9.1
NuGet 3.0 was released with VS2015: http://docs.nuget.org/release-notes/nuget-3.0.0
In earlier versions of Visual Studio you could add a System reference to System.Net.Http, but Microsoft has now moved that into a NuGet package.

How do I find the right NuGet package for my framework version

I need the Microsoft ASP.Net Web Pages NuGet package, but I need the version which targets .net 4.0
How do I figure this out?
Is there a way to figure this out for any given NuGet Package?
The later versions of the Microsoft.AspNet.WebPages NuGet package only support .NET 4.5
The older version 2.0.30506.0 supports .NET 4.0
To figure this out I used the NuGet Package Explorer, displayed the list of package versions and opened a few of the NuGet packages to see what .NET frameworks they support. As far as I am aware you cannot get the supported .NET frameworks from the metadata returned by the nuget.org OData feed. The only way I know is to look inside the NuGet package itself.

how do you install an older version of NuGet in Visual Studio 2010?

How do you install an older version of NuGet in vs2010?
Not use NuGet to install a older version of something else, but install say NuGet v1.5 instead of NuGet v2.2?
The older versions of NuGet are available to download from codeplex on the releases page.
NuGet 1.5 for example is available to download from codeplex: NuGet.Tools-1.5.vsix.

Which Nuget version to use for a package released today

i release an assembly in form of a nuget packet. i can choose between nuget commandline version 1.4, 1.5 (3 versions) or 1.6. which version should one use?
You should generally always use the latest version (run nuget.exe update -self to make sure you're up-to-date). With every new release of NuGet, we ensure that packages built using an older version still work.