spec command (NuGet CLI)

Applies to: package creation • Supported versions: all

Generates a .nuspec file for a new package. If run in the same folder as a project file (.csproj, .vbproj, .fsproj), spec creates a tokenized .nuspec file. For additional information, see Creating a Package.


nuget spec [<packageID>] [options]

where <packageID> is an optional package identifier to save in the .nuspec file.


Option Description
AssemblyPath Specifies the path to the assembly to use for metadata.
Force Overwrites any existing .nuspec file.
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 Specifies the amount of detail displayed in the output: normal, quiet, detailed.

Also see Environment variables


nuget spec

nuget spec MyPackage

nuget spec -AssemblyPath MyAssembly.dll