Library placeholders

A library placeholder is a placeholder that references a particular library. The placeholder can either be resolved to a fixed version or to the "always latest" version of this library.

The resolution of all the placeholders in the project is set at the application level. This means that, at the application level, you can set the resolution of the placeholders that are directly integrated at the application level as well as those that are used within referenced libraries.
In other words, you can specify from the outside to which library a library placeholder that is integrated within another library should be resolved. It is not necessary to save the outer library again to change the versions of the internally used library placeholders. For more information on how to set the resolution of placeholders, see section Changing the placeholder resolution.

On account of these options the adaptation of the library versions used requires very little effort, thus making the engineering process of projects and libraries very flexible.

When a library reference is integrated in a project, it is advisable to use a placeholder instead of a library.

Sample

  • An application project requires the libraries LibA and LibB.
  • The library LibB also requires access to the modules of LibA.
  • LibA is therefore used as direct library in the application, but also as sub-library of LibB.
  • Through referencing of LibA as a placeholder (both in the application and in LibB), definition of the placeholder resolution in the application project enables the user to specify which version of LibA should be used in the whole project (application and LibB).
  • If, for example, a change is required within LibA, while the interfaces of LibA remain unchanged and compatibility with the previous version is ensured, this makes it easy to use the new library version in the whole project (application and LibB).
    To this end, the modified LibA is created and installed with a new version number (e.g. change from version 1.0.0.0 to 1.0.0.1). If the placeholder LibA was resolved in the application project as a fixed library version, i.e. 1.0.0.0, the placeholder resolution is changed accordingly, to LibA version 1.0.0.1. If, however, the placeholder LibA was defined as “latest version” in the application project, no adaptation is required, i.e. after installation of LibA version 1.0.0.1 this is automatically referenced and used in the whole project (application and LibB).

Detecting libraries and placeholders

Whether a library reference is integrated as a library or as a placeholder can be determined based on differences in the Library Manager and in the Properties window.

  • Library Manager: If a placeholder is used, the library name is assigned to the placeholder name, to indicate which "actual" library the placeholder refers to (e.g. MyPlaceholder = Tc2_Standard, * (Beckhoff Automation GmbH)). This is not the case for a library: only the library name is displayed here (Tc2_Standard, * (Beckhoff Automation GmbH)).
    In the following screenshot the first two entries in the Library Manager are placeholders, the third entry indicates the application in a library.
    Library placeholders 1:
  • Properties window: The Properties window shows directly in the top line whether placeholder or library properties are concerned.
    The properties displayed in the Properties window differ accordingly: a placeholder is resolved to a particular library including a particular library version, whereas a library is fixed, and only the version can be adjusted. The namespace can be configured in the Properties window in both cases.
    Library placeholders 2: