---
title: "Create-Package"
---
Creates a universal package from the specified directory and publishes to a feed.
ProGet::Create-Package(
Name: <text>,
Version: <text>,
[From: <text>],
[PushTo: <text>],
[To: <text>],
[Include: <@(text)>],
[Exclude: <@(text)>],
[Metadata: <%(key1: value1, ...)>],
[Overwrite: <true/false>],
[Feed: <text>],
[EndpointUrl: <text>],
[UserName: <text>],
[Password: <text>],
[ApiKey: <text>]
);
Name | Format | Script Usage | Usage Notes |
---|---|---|---|
☆ Package name | text | Name | This argument is required. |
☆ Package version | text | Version | This argument is required. |
Source directory | text | From | Value note: "$WorkingDirectory". |
To package source | text | PushTo | |
Package file name | text | To | This may either be a file name or a directory. If the value ends with .upack, then this is treated as a file name. Otherwise, it is treated as an output directory into which the package file will be written. Value note: "<Name>-<Version>.upack". |
Include files | @(text) | Include | See KB#1119 to learn more about masking syntax. Value note: "** (all items in directory)". |
Exclude files | @(text) | Exclude | See KB#1119 to learn more about masking syntax. Value note: "include all files". |
Additional metadata | %(key1: value1, ...) | Metadata | Additional properties may be specified using map syntax. For example: %(description: my package description). |
Overwrite existing package | true/false | Overwrite | |
Feed name | text | Feed | Not specifying will "Use Feed from package source". |
API endpoint URL | text | EndpointUrl | Not specifying will "Use URL from package source". |
ProGet user name | text | UserName | The name of a user in ProGet that can access this feed. Not specifying will "Use user name from package source". |
ProGet password | text | Password | The password of a user in ProGet that can access this feed. Not specifying will "Use password from package source". |
ProGet API Key | text | ApiKey | An API Key that can access this feed. Not specifying will "Use API Key from package source". |
ProGet::Create-Package
(
Name: MyAppPackage,
Version: 3.4.2,
From: $WorkingDirectory,
PushTo: MyPackageSource
);