Command: Resolve Libraries, Resolve All Libraries
Function: The command resolves the library references and stores the references in the Libraries.lock.json file.
Call: Right-click the Libraries.json item or the Libraries.lock.json item.
Context menu of the
Libraries.jsonitemContext menu of the
Libraries.lock.jsonitem
Library resolution refers to the process of recursively analyzing all library references of the application and libraries. The complete dependency graph is created and saved in the Libraries.lock.json file during this process.
The compiler uses only the contents of the Libraries.lock.json file in order to load library references. Library resolution is triggered once when a device project is created and after that only by explicit user interaction. As a result, the dependency graph never changes for an existing project without explicit user interaction.
After editing the
Libraries.jsonfileAfter editing or replacing devices
After changing a library version
Important
The Libraries.lock.json file and the hash make sure that the referenced libraries remain the same across different builds – not just their IDs, but also their contents.
The Resolve Libraries command re-resolves only those libraries whose references have changed, for example because they have been newly added. Libraries which have already been resolved remain in the version which is stated in Libraries.lock.json. This allows individual libraries to be added or updated without changing the other references.
The Resolve All Libraries command always re-resolves all references and ignores the Libraries.lock.json file if it exists.
Libraries which are referenced with a relative path are resolved by the path.
Library references with fixed version library IDs are resolved to that fixed version.
Library references with a version pattern are resolved to the latest version of that library which matches the pattern.
Placeholders for libraries with a placeholder override in the top level of
Libraries.jsonare resolved according to the override.Placeholders, for which a component in CODESYS 4 or an extension defines a placeholder resolution, are resolved to this version.
Placeholders with a unique resolution in the existing device descriptions are resolved according to the placeholder definitions in the device descriptions. (XML path:
library-management\\placeholder-libraries\\)Required libraries which are unresolved will trigger an error.