How to update Nuget Package Manager Without Visual Studio installed? - nuget

There is a build server without Visual Studio, there are only build tools (MSBuild.exe, Nuget Manager,...). The Nuget Packet Manager need to upgraded to new version, but I cannot find any installer or way how to upgrade it without Visual Studio Gallery.
How shoudl I upgrade the Nuget Manager on build server?

The latest version of the nuget.exe command-line tool is always available from http://nuget.org/nuget.exe.
More details

Related

Visual Studio 2017: Package Restore failed, Rolling back Package changes for 'Projectname'

Added the new Package using Package Manager console or manage nuget packages in Project it's not added project it's Throw below Error.
I was Check some Links Not give proper reason. why this problem in coming in vs2017
Anyone Know Share the knowledge.
Thanks in Advance
Visual Studio 2017: Package Restore failed, Rolling back Package changes for 'Projectname'
You could not install the package exceldatareader.dataset to the UWP project. That because this package only have the .NET Framework assemblies, which is not compatible with UWP project. You can download that package from nuget.org, then open it, you will find this package only have the assemblies for .NET 2.0 and .NET 4.5:
So this package is not compatible with UWP project, you can find the error message in the output window when you install it to the UWP project:
Hope this helps.

Where is NuGet in VS2017 Community?

Just installed VS2017 Community edition -- I read some doc saying that NuGet is included -- but I don't see it and don't see how to add it. Should it appear basically as it did in VS2015?
You have to find it in the installer, second tab - "Packages", under the subheading "Code Tools"
You can launch the installer from the Tools menu in VS, it should be the first option.
I had the same issue. When I installed VS 2017, I only had Microsoft Visual Studio Offline Package. I can't remember how I figured it out, but I did. What you have to do is:
Open VS 2017.
Select Tools > NuGet Package Manager > Package Manager Settings.
In Options, select NuGet Package Manager > Package Sources.
Select + next to Available package sources.
Enter these values:
Name: nuget.org
Source: https://api.nuget.org/v3/index.json
Select OK.
Now, when you run Install Package commands, you'll get what you need.
NOTE: In the Package Manager Console, as your Package source, make sure you select All or nuget.org.
It was included as an option, NOT installed by default.
To install NuGet:
1. Tools > Get Tools and Features...
2. Single Component > Code Tools
3. √ NuGet package manager
4. update.
To find NuGet:
- Project > Manage NuGet packages...
- Tools > NuGet Package Manager
Project or Tools
In Visual Studio 2017,
Click on Tools -> Nuget Package Manager -> Package Manager Console :)
For anyone who stumbled across this question while trying to find out where nuget was installed to use it as a CLI, if you didn't install it individually you need to use it through MsBuild.exe's use of /t:restore to for example restore nuget packages. You'll have to install the individual component if you want the full tool and not just calls to a DLL via MSBuild.

Nuget for PowerShell Projects in Visual Studio

How can I install nuget packages for my PowerShell Projects in Visual Studio 2015? I have tried to do it with both the PowerShell Module Project and PowerShell Script Project. I have installed PowerShell Tools for Visual Studio 2015.
When I open these projects, the Default project in the Package Manager Console is empty. Here is a screenshot of what I mean.
When I try to install a nuget package, e.g. Pester, I get the following error.
I know this thread might be outdated and is rather old but my older article with some possible solutions might help here. I tested current state and still, no support inside VS 2015 for PowerShell project and NuGet packages together.
the current state is :
go with https://chocolatey.org/ and install it on your dev box (and CI) => you install pester globally with : choco install pester and update it if needed.
use old packages.config and update by hand version number and run nuget restore (nuget update will no longer work for this type of solution).
version whole pester into repo and call it directly. you can use nuget install pester for this (if you have nuget in path somewhere)
The link : http://rostacik.net/2015/12/16/how-to-use-nuget-packages-even-with-powershell-projects-with-visual-studio-2015/

'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.

Error Installing NuGet 1.8

NuGet 1.8 seems to have some interesting new features. Unfortunately when I attempt to update from within Visual Studio, I get the error:
Value cannot be null.
Parameter name: v1
I figured I would just install it from outside Visual Studio and see if that works better, but the download link I found
http://nuget.codeplex.com/releases
does not list any downloads for "NuGet Visual Studio extension".
How can I update NuGet?
Update
This is on Windows 7 64-bit, Visual Studio Ultimate 2010SP 1, upgrading from recent NuGet version (how do I check version number?) to NuGet 1.8.
Based on the comments, I did the following:
Closed all instances of Visual Studio
Started a new instance of Visual Studio as Administrator
Tools / Extension Manager
Select NuGet Package Manager
Click Uninstall (if you're not Administrator, Uninstall is grayed out)
Restart Visual Studio (still as Administrator)
Tools / Extension Manager
Online Gallery
Install NuGet
Restarted Visual Studio (this time not as Administrator)
Resumed work