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:
Creating a NuGet package 3:
More detailed information about the current progress can be obtained from the Package Manager Console.
3. If the NuGet package is created successfully, the following message appears:
Creating a NuGet package 4:
Click Explore to open the local repository for user-specific NuGet packages. This can be found in the installation directory under:
C:\TwinCAT\Functions\TE2000-HMI-Engineering\References
The NuGet package can now be installed in an HMI project. Select TwinCAT HMI Customer as package source.

Specifying metadata 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 5:

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

Creating a NuGet package 6: