Download Nuget Packages Without VS/NuGet Package Manager

后端 未结 6 1839
盖世英雄少女心
盖世英雄少女心 2021-02-01 04:01

How can I download NuGet Packages outside of visual studio? so it can be used to create offline packages.

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-01 04:10

    Install the NuGet command line program:

    The NuGet command line may be installed onto a machine in a few possible ways.

    1. Direct download of the executable from https://dist.nuget.org/win-x86-commandline/latest/nuget.exe. The executable may be placed anywhere on the file system, and in most cases should be placed in a directory that is listed in the PATH environment variable.
    2. Install the NuGet.CommandLine package from the NuGet Visual Studio client and either move nuget.exe to a common location or execute it in the context of your project.
    3. Install the NuGet.CommandLine Chocolatey package using the Chocolatey client. More information on Chocolatey can be found at [http://chocolatey.org].

    Then run nuget install package to download and install package in the current directory.

    More about the NuGet command line program:

    • Command Line Reference

提交回复
热议问题