pack command
Overview
Packages extensions.
Format
NDExt pack [options]
Option
| Option | Arguments | Meaning |
|---|---|---|
| -p, --project | <project> | Specifies the directory of the target project. If not specified, it searches the current directory and its subdirectories. |
| -v, --ndver | <ndver> | The Next Design version to target. If not specified, it defaults to 3.1. |
| -c, --config | <config> | Specifies the build configuration. Specify Debug or Release. If not specified, it defaults to Release. |
| -o, --output | <output> | Specifies the folder to store the created package. If not specified, it defaults to ndpackages. |
| -d, --copydir | <copydir> | Copies the created package to the specified folder. |
Example of Execution
Executing the following will search for all extension projects (.csproj) in the current directory and its subdirectories, build them, and package them.
c:\myproject\src> ndext pack
If the pack command is executed successfully, a nupkg file will be created in the output folder. Opening the nupkg file with NuGet Package Explorer will show the following:

The files under the pkgContents folder of the project created with the new command will be placed under profiles, samples, and templates, respectively.
For information on how to publish and use the created package, please see the following page.
Package Property Settings
Package property settings utilize information from the csproj file.
If you are using Visual Studio, this information can be set in the "Packages" tab of the project properties. The following information is required.
| Setting Item | XML Tag in csproj | Description |
|---|---|---|
| Package ID | PackageId | A unique name to distinguish the package. Specify it like "MyCompany.SomePackage". |
| Package Description | Description | Used for the package description. It can be any string. |
| Version | Version | Used as the version to identify the package. It will be something like "1.0.0". |
| Creator | Authors | This is information about the package creator. Please enter the company name, etc. |
You can also set information for the package by specifying Copyright and PackageProjectUrl.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<PackageId>SampleExt</PackageId>
<Version>1.0.0</Version>
<PackageProjectUrl>https://www.your-web-here.com/</PackageProjectUrl>
<Authors>Me</Authors>
<Company>Me</Company>
<Product>SampleExt</Product>
<Description>Please write the description of SampleExt here. </Description>
<Copyright>(Copyright Here)</Copyright>
</PropertyGroup>
...
</Project>
When the pack command is executed on the above project file (csproj), a nuspec file like the following is generated:
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>SampleExt</id>
<version>1.0.0</version>
<authors>Me</authors>
<owners>Me</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<projectUrl>https://www.your-web-here.com/</projectUrl>
<Description>Please write a description of SampleExt here.</Description>
<releaseNotes></releaseNotes>
<copyright>(Copyright Here)</copyright>
</metadata>
</package>