Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Pack Options

Somatic edited this page · 3 revisions
Clone this wiki locally

The NuGet Pack task allow creating NuGet Package from NuGet specification file, and allow live customization of nuspec file.

Example

grunt.initConfig({
    nugetpack: {
        dist: {
            src: 'tests/Package.nuspec',
            dest: 'tests/',

            options: {
                version: "1.0.0"
            }
        }
    }
});

You can find more options on this page.

src

type: string, array | required

Specify input files to build. Accept globbing patterns

dest

type: string | optional | default: './'

Specify output directory to create packages in

options

type: object | optional

Additionnal Options

options.outputDirectory

type: string | optional | default: dest

Specify output directory to create packages in. Optional since it can be specified by using dest argument.

options.basePath

type: string | optional | default: 'nuspec file's folder'

The base path of the files defined in the nuspec file.

options.verbose

type: boolean | optional | default: false

Shows verbose output for package building.

options.version

type: string | optional

Overrides the version number from the nuspec file.

options.exclude

type: string | optional

Specifies one or more wildcard patterns to exclude when creating a package.

options.symbols

type: boolean | optional | default: false

Determines if a package containing sources and symbols should be created. When specified with a nuspec, creates a regular NuGet package file and the corresponding symbols package.

options.tool

type: boolean | optional | default: false

Determines if the output files of the project should be in the tool folder.

options.build

type: boolean | optional | default: false

Determines if the project should be built before building the package.

options.noDefaultExcludes

type: boolean | optional | default: false

Prevent default exclusion of NuGet package files and files and folders starting with a dot e.g. .svn.

options.noPackageAnalysis

type: boolean | optional | default: false

Specify if the command should not run package analysis after building the package.

options.includeReferencedProjects

type: boolean | optional | default: false

Include referenced projects either as dependencies or as part of the package. If a referenced project has a corresponding nuspec file that has the same name as the project, then that referenced project is added as a dependency. Otherwise, the referenced project is added as part of the package.

options.excludeEmptyDirectories

type: boolean | optional | default: false

Prevent inclusion of empty directories when building the package.

options.properties

type: string | optional

Provides the ability to specify a semicolon ";" delimited list of properties when creating a package.

options.minClientVersion

type: string | optional

Set the minClientVersion attribute for the created package. This value will override the value of the existing minClientVersion attribute (if any) in the .nuspec file.

options.configFile

type: string | optional | default: '%AppData%\NuGet\NuGet.config'

The NuGet configuation file. If not specified, file %AppData%\NuGet\NuGet.config is used as configuration file.

Something went wrong with that request. Please try again.