-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Document dotnet pack nuspec #52841
Copy link
Copy link
Open
Labels
📌 seQUESTeredIdentifies that an issue has been imported into Quest.Identifies that an issue has been imported into Quest.
Description
dotnet pack now supports supports a nuspec.
So running dotnet pack mypkg.nuspec now works.
It seems like --version was added as well and it's not documented either.
Relevant content:
dotnet/sdk#49813
https://github.com/NuGet/Home/blob/dev/accepted/2025/dotnet-pack-nuspec.md
E:\NuGet\nuget.client [dev ≡]> dotnet pack --help
Description:
.NET Core NuGet Package Packer
Usage:
dotnet pack [<PROJECT | SOLUTION | FILE>...] [options]
Arguments:
<PROJECT | SOLUTION | FILE> The project or solution or C# (file-based program) file to operate on. If a file is not specified, the command will search the current directory for a project or solution.
Options:
-o, --output <OUTPUT_DIR> The output directory to place built packages in.
--artifacts-path <ARTIFACTS_DIR> The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.
--no-build Do not build the project before packing. Implies --no-restore. [default: False]
--include-symbols Include packages with symbols in addition to regular packages in output directory. [default: False]
--include-source Include PDBs and source files. Source files go into the 'src' folder in the resulting nuget package. [default: False]
-s, --serviceable Set the serviceable flag in the package. See https://aka.ms/nupkgservicing for more information. [default: False]
-nologo, --no-logo Do not display the startup banner or the copyright message. [default: True]
--interactive Allows the command to stop and wait for user input or action (for example to complete authentication). [default: True]
--no-restore Do not restore the project before building. [default: False]
-v, -verbosity <LEVEL> Set the MSBuild verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].
--version-suffix <VERSION_SUFFIX> Set the value of the $(VersionSuffix) property to use when building the project.
--version <VERSION> The version of the package to create
-c, --configuration <CONFIGURATION> The configuration to use for building the package. The default is 'Release'.
--disable-build-servers Force the command to ignore any persistent build servers. [default: False]
--ucr, --use-current-runtime Use current runtime as the target runtime. [default: False]
-r, --runtime <RUNTIME_IDENTIFIER> The target runtime to build for.
-?, -h, --help Show command line help.
E:\NuGet\nuget.client [dev ≡]>Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: a7e805a3-f2ec-b05a-d5c8-29f7a8c16a5f
- Version Independent ID: 4257ec12-df6f-ec52-aad3-012e5fce8133
- Platform ID: 3ad7cdeb-d048-a6b1-b08b-d01247b833fe
- Content: dotnet pack command - .NET CLI
- Content Source: docs/core/tools/dotnet-pack.md
- Service: dotnet-fundamentals
- GitHub Login: @meaghanlewis
- Microsoft Alias: mosagie
Reactions are currently unavailable
Metadata
Metadata
Labels
📌 seQUESTeredIdentifies that an issue has been imported into Quest.Identifies that an issue has been imported into Quest.
Type
Projects
Status
👀 In review