豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Latest commit

 

History

History
59 lines (36 loc) · 1.76 KB

File metadata and controls

59 lines (36 loc) · 1.76 KB
title NuGet CLI init command
description Reference for the nuget.exe init command
author JonDouglas
ms.author jodou
ms.date 01/18/2018
ms.topic reference

init command (NuGet CLI)

Applies to: package creation • Supported versions: 3.3+

Copies all the packages from a flat folder to a destination folder using a hierarchical layout as described for the add command. That is, using init is equivalent to using the add command on each package in the folder.

As with add, the destination must be either a local folder or a UNC path; HTTP package repositories such as nuget.org or private servers are not supported.

Usage

nuget init <source> <destination> [options]

where <source> is the folder containing packages and <destination> is the local folder or UNC pathname to which the packages are copied.

Options

  • -ConfigFile

    The NuGet configuration file to apply. If not specified, %AppData%\NuGet\NuGet.Config (Windows), or ~/.nuget/NuGet/NuGet.Config or ~/.config/NuGet/NuGet.Config (Mac/Linux) is used.

  • -Expand

    Adds all files in each package that's added to the package source; same as -Expand with the add command.

  • -ForceEnglishOutput

    (3.5+) Forces nuget.exe to run using an invariant, English-based culture.

  • -?|-help

    Displays help information for the command.

  • -NonInteractive

    Suppresses prompts for user input or confirmations.

  • -Verbosity [normal|quiet|detailed]

    Specifies the amount of detail displayed in the output: normal (the default), quiet, or detailed.

Also see Environment variables

Examples

nuget init c:\foo c:\bar
nuget init \\foo\packages \\bar\packages -Expand