Table Of Contents

Defining Package Relationships

Last Modified: March 3, 2020

Relationships define the types of dependencies packages can declare between themselves, which determines the install behavior of packages. Relationship definitions include properties like package names, version numbers, and other parameters. Access relationship properties for each package dependency using the Properties pane.

Options for Relationships

Relationship Description Install Behavior Example
Depends This package must be installed with the dependent package. NI Package Manager always installs this package with the package that depends on it. Package A depends on Package B. B must already be installed, or NI Package Manager installs it at the same time as A.
Recommends Another package is typically installed with this one, but is not required. NI Package Manager recommends including this package during installation, and it is selected by default. Package A recommends package B. NI Package Manager recommends B when installing A if it is available in a registered NI Package Manager feed, or exists within the same package installer as A.
Suggests Another package enhances the usefulness of this package, but is not required. NI Package Manager suggests including this package during installation, but it will not be selected by default. Package A recommends Package B. NI Package Manager recommends B when installing A if it is available in a registered NI Package Manager feed, or exists within the same package installer as A.
Conflicts You cannot install another package at the same time as this package. The conflicting package cannot already be installed when you install this package. NI Package Manager will prompt you to uninstall the conflicting package and any others that depend on it. Package A conflicts with Package B. A cannot install at the same time as B. NI Package Manager uninstalls A if it already exists.
Provides A providing package satisfies dependencies from other packages for this package, and can act as its replacement. NI Package Manager installs normally. Package A provides for Package B. NI Package Manager installs a dependent Package C if either A or B is installed.
Replaces A replacing package uninstalls and replaces an existing package, or replaces specific contents within an existing package. NI Package Manager installs normally. Package A replaces Package B. When NI Package Manager installs A, it uninstalls B.
Supplements This package is typically installed with another one, but is not required. NI Package Manager recommends including this package during installation, and it is selected by default. Package A supplements package B. NI Package Manager recommends A when installing B if it is available in a registered NI Package Manager feed, or exists within the same package installer as B.
Enhances This package enhances the usefulness of another package, but is not required. NI Package Manager suggests including this package during installation, but it will not be selected by default. Package A enhances Package B. NI Package Manager recommends A when installing B if it is available in a registered NI Package Manager feed, or exists within the same package installer as B.
spd-note-note
Note

Package Builder does not support specifying alternate package relationships, i.e., package A (<=2.0) | package B (>= 3.0).

Options for Constraints

Use constraints to restrict a relationship to specific versions. Constraints determine package installation based on existing package versions installed on the target machine at install time.

You are not required to set a constraint. Packages typically use the >= constraint to support upgrading dependencies without invalidating the state of your package.

For instance, if your solution contains Package A that depends on Package B with the >= constraint and a version 2.0, you can install version 3.0 of Package B without uninstalling Package A.

Constraint Effect on Package Install Behavior
Any version Any package version satisfies the dependency relationship.
> The package version must be later than a specific version to satisfy the dependency relationship.
>= The package version must be later or equal to a specific version to satisfy the dependency relationship.
= The package version must be equal to the version specified by the dependent package properties to satisfy the dependency relationship.
spd-note-note
Note

Use the complete version number when specifying equal constraints. NI product version numbers are generally in the form of '19.0.0.48154-0+f0'.

<= The package version must be earlier or equal to a specific version to satisfy the dependency relationship.
< The package version must be earlier than to a specific version to satisfy the dependency relationship.

Version Type

The default value for Version Type is AutoUpdate, which is the recommended setting. Builds include the latest version of a package built by the solution or installed on the system when Version Type is set to AutoUpdate. Set the Version Type to Custom if you want to designate a specific package version.


Recently Viewed Topics