Creating a NuGet package

NuGet packages can be created from framework projects or from server extension projects.

1. Right-click on the respective project node and click Create NuGet Package... in the context menu:
Creating a NuGet package 1:
2. Confirm the following query with Yes to include the latest version of your sources in the package:
Creating a NuGet package 2:
Package generation starts, and a progress bar shows the progress:
More detailed information about the current progress can be obtained from the Package Manager Console.
3. If the NuGet package has been successfully created, the following message appears:
Creating a NuGet package 3:
Clicking on Explorer opens the local repository for user-specific NuGet packages. This is located in the installation directory at:
C:\ProgramData\Beckhoff\NuGetPackages
The NuGet package can now be installed in an HMI project. Select TwinCAT HMI Customer as package source.

Specifying meta information for a NuGet package

Both project types contain a *.nuspec file, in which meta information for the respective NuGet package is defined. The nuspec file at the top level in the respective project type:

Creating a NuGet package 4:

For information on the structure of the *.nuspec file please refer to the corresponding Microsoft documentation.

Creating a NuGet package 5: