.\" Automatically generated by Pandoc 1.15.1 .\" .hy .TH "DOTNET\-PACK" "1" "June 2016" "" "" .SS NAME .PP \f[C]dotnet\-pack\f[] \- Packs the code into a NuGet package .SS SYNOPSIS .PP \f[C]dotnet\ pack\ [\-\-output]\ \ \ \ \ \ \ [\-\-no\-build]\ [\-\-build\-base\-path]\ \ \ \ \ \ \ [\-\-configuration]\ \ [\-\-version\-suffix]\ \ \ \ \ []\f[] .SS DESCRIPTION .PP The \f[C]dotnet\ pack\f[] command builds the project and creates NuGet packages. The result of this operation is two packages with the \f[C]nupkg\f[] extension. One package contains the code and the other contains the debug symbols. .PP NuGet dependencies of the project being packed are added to the nuspec file, so they are able to be resolved when the package is installed. Project\-to\-project references are not packaged inside the project by default. If you wish to do this, you need to reference the required project in your dependencies node with a \f[C]type\f[] set to "build" like in the following example: .IP .nf \f[C] { \ \ \ \ "version":\ "1.0.0\-*", \ \ \ \ "dependencies":\ { \ \ \ \ \ \ \ \ "ProjectA":\ { \ \ \ \ \ \ \ \ \ \ \ \ "target":\ "project", \ \ \ \ \ \ \ \ \ \ \ \ "type":\ "build" \ \ \ \ \ \ \ \ } \ \ \ \ } } \f[] .fi .PP \f[C]dotnet\ pack\f[] by default first builds the project. If you wish to avoid this, pass the \f[C]\-\-no\-build\f[] option. This can be useful in Continuous Integration (CI) build scenarios in which you know the code was just previously built, for example. .SS OPTIONS .PP \f[C][project]\f[] .PP The project to pack. It can be either a path to a \f[C]project.json\f[] file or to a directory. If omitted, it will default to the current directory. .PP \f[C]\-o\f[], \f[C]\-\-output\f[] [DIR] .PP Places the built packages in the directory specified. .PP \f[C]\-\-no\-build\f[] .PP Skips the building phase of the packing process. .PP \f[C]\-\-build\-base\-path\f[] .PP Places the temporary build artifacts in the specified directory. By default, they go to the obj directory in the current directory. .PP \f[C]\-c\f[], \f[C]\-\-configuration\ [Debug|Release]\f[] .PP Configuration to use when building the project. If not specified, will default to "Debug". .SS EXAMPLES .PP \f[C]dotnet\ pack\f[] .PP Packs the current project. .PP \f[C]dotnet\ pack\ ~/projects/app1/project.json\f[] .PP Packs the app1 project. .PP \f[C]dotnet\ pack\ \-\-output\ nupkgs\f[] .PP Packs the current application and place the resulting packages into the specified folder. .PP \f[C]dotnet\ pack\ \-\-no\-build\ \-\-output\ nupkgs\f[] .PP Packs the current project into the specified folder and skips the build step. .SH AUTHORS Microsoft Corporation dotnetclifeedback\@microsoft.com.