Integrating a project

The content of a framework project can be referenced in an HMI project in the same Visual Studio solution or exported as a NuGet package. As a package it can be imported several times into different projects and thus reused.

Integration via reference

Integrating a project 1:

For integration via a reference select "Add Reference...". This opens a dialog in which all framework projects within the same solution are listed:

Integrating a project 2:

If the project was selected with the checkbox, it is shown under References in the HMI project:

Integrating a project 3:

When the framework project is built, the HMI project recognizes this and updates the controls and other files from the referenced project.

Integration via NuGet package

Before the current content can be integrated, it must be created as a NuGet package. This can easily be done via the menu item "Create NuGet Package ...":

Integrating a project 4:

The package is created in the directory C:\TwinCAT\Functions\TE2000-HMI-Engineering\References. In Visual Studio this directory is known as "TwinCAT HMI Customer“. The file name is generated from the package name and its version number. Both can be set in the nuspec file.

To integrate the created file into an HMI project, select "Manage NuGet Packages ...":

Integrating a project 5:

Here, "TwinCAT HMI Customer" is selected on the right-hand side of the NuGet Package Manager, and the new package can be seen in the "Browse" tab.

Integrating a project 6:

If the package was selected with "Install", it is shown under References in the HMI project:

Integrating a project 7:

Passing on NuGet packages

Since the package forms a closed unit, it can also be passed on as a file. Different options are available.

Integrating a project 8: