Installing NuGet client tools • • 5 minutes to read • Contributors • • • • • • In this article Looking to install a package? To work with NuGet, as a package consumer or creator, you can use as well as.
To give consent, open the Visual Studio Options dialog, click on Package Manager node and check 'Allow NuGet to download missing packages during build.' You can also give consent by setting the environment variable 'EnableNuGetPackageRestore' to 'true'.' Extension for Visual Studio Code - Add or remove.NET Core 1.1+ package references to/from your project's.csproj or.fsproj file using Code's Command Palette. @AliRFarahnak - The Package Manager Console sugested by Jakub is one way to install a specific version. If you are using Xamarin Studio 6.0 you can also use a package version search in the Add Packages dialog to show all the versions. This article briefly outlines the capabilities of the different tools, how to install them, and their comparative. To get started using NuGet to consume packages, see. To get started creating NuGet packages, see. Tool Description Download Included with the.NET Core SDK and provides core NuGet features on all platforms. Provides all NuGet capabilities on Windows, provides most features on Mac and Linux when running under Mono. On Windows, provides NuGet capabilities through the Package Manager UI and Package Manager Console; included with.NET-related workloads. On Mac, provides certain features through the UI. In Visual Studio Code, NuGet features are provided through extensions. The also provides the ability to restore and create packages, which is primarily useful on build servers. MSBuild is not a general-purpose tool for working with NuGet. CLI tools The two NuGet CLI tools are dotnet.exe and nuget.exe. See for a comparison. Dotnet.exe CLI The.NET Core 2.0 CLI, dotnet.exe, works on all platforms (Windows, Mac, and Linux) and provides core NuGet features such as installing, restoring, and publishing packages. ![]() Package Manager Console CommandsDotnet provides direct integration with.NET Core project files (such as.csproj), which is helpful in most scenarios. Dotnet is also built directly for each platform and does not require you to install Mono. Installation: • On developer computers, install the. • For build servers, follow the instructions on. For more information, see. Nuget.exe CLI The NuGet CLI, nuget.exe, is the command-line utility for Windows that provides all NuGet capabilities; it can also be run on Mac OSX and Linux using with some limitations. Unlike dotnet, the nuget.exe CLI does not affect project files and does not update packages.config when installing packages. Installation: Windows • Visit and select NuGet 3.3 or higher (2.8.6 is not compatible with Mono). The latest version is always recommended, and 4.1.0+ is required to publish packages to nuget.org. The file is not an installer; you won't see anything if you run it directly from the browser. • Add the folder where you placed nuget.exe to your PATH environment variable to use the CLI tool from anywhere. MacOS/Linux Behaviors may vary slightly by OS distribution. Visual Studio For Mac Package Manager Console• Execute the following command at a shell prompt: # Download the latest stable `nuget.exe` to `/usr/local/bin` sudo curl -o /usr/local/bin/nuget.exe • Create an alias by adding the following script to the appropriate file for your OS (typically ~/.bash_aliases or ~/.bash_profile): # Create as alias for nuget alias nuget='mono /usr/local/bin/nuget.exe' • Reload the shell. Test the installation by entering nuget with no parameters. NuGet CLI help should display. Note The latest recommended NuGet CLI is always available at For compatibility purposes with older continuous integration systems, a previous URL, currently provides the. Visual Studio • Visual Studio Code: NuGet capabilities are available through marketplace extensions, or use the dotnet.exe or nuget.exe CLI tools. • Visual Studio for Mac: certain NuGet capabilities are built in directly. See for a walkthrough. Visual Studio For Mac Package Manager Console AddFor other capabilities, use the dotnet.exe or nuget.exe CLI tools. • Visual Studio on Windows: The NuGet Package Manager is included with Visual Studio 2012 and later. The Package Manager provides the and the, through which you can run most NuGet operations.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |