TestStand Shows Version Error After Compiling VIs in LabVIEW 2024 Q3 or Later

Updated Feb 20, 2025

Reported In

Software

  • TestStand 2020
  • TestStand 2021
  • TestStand 2022 Q4
  • TestStand 2023 Q4
  • LabVIEW 2024 Q3
  • TestStand
  • LabVIEW

Issue Details

I am updating my code modules to a newer version of LabVIEW. All VIs in my project have the Separate compiled code from source file option checked. I usually compile all the VIs together (mass compile) and run them from TestStand using the LabVIEW Runtime Engine. However, TestStand is showing an error in my LabVIEW steps, indicating that the VIs cannot be loaded due to a version mismatch between the file being loaded and the LabVIEW Runtime Engine. It seems like my code was not properly upgraded after the mass compilation.

The error messages vary depending on the VI context and adapter settings.

  • If I set the LabVIEW Runtime Engine version to a specific version (for example, 25.1) in LabVIEW the adapter configuration dialog:

    • Error seen for a VI in a Class.

      Unable to load VI 'Read Numeric.vi' with the LabVIEW Run-Time Engine version '25.1' because the VI version is '21.0'. To load a VI, the version of the run-time engine and the version of the VI must match.

      To avoid this error, either:
      1) Mass compile the VI
      2) Ensure that the LabVIEW Run-Time Engine version that matches the VI version exists on the computer.

      Also modify the LabVIEW Adapter to use the setting 'Auto detect using VI version' when using a run-time engine, or you can modify the advanced setting 'Always Run VI in LabVIEW Run-Time Engine' for the LabVIEW step.

    • Error seen for a VI in a Project Context.

      LabVIEW cannot convert the LabVIEW project version (21.0) to LabVIEW run-time engine version (25.1). The project or one of its libraries is in an older version.

  • If I set the LabVIEW Runtime Engine to Auto-Detect in the LabVIEW adapter configuration dialog:

    • For a VI in Project Context, when the old LabVIEW Runtime Engine is not installed.

      TestStand cannot locate a LabVIEW Run-Time Engine of version '21.0' and bitness '64-bit'.
       

    • For a VI in Project Context, when the old LabVIEW Runtime Engine is installed.

      Unable to load VI 'vi in proj.vi' with the LabVIEW Run-Time Engine version 21.0 (64-bit). The version of a subVI might not match the version of the run-time engine and the Version Independent Runtime feature is disabled or a VI dependency might be missing.

      To troubleshoot the issue, either mass compile your code module VIs or try the following steps on the current machine:
      1. Open 'vi in proj.vi' in the LabVIEW development system. If the VI is broken, fix any errors in the VI.
      2. Force compile the VI by clicking the run arrow while holding the 'Ctrl' key.
      3. In LabVIEW, select File >> Save All to ensure that all subVIs are saved in the same LabVIEW version.

       

  • If I enable the Version Independent Runtime Engine option:

    • For a VI in Project Context.

      Unable to load VI 'vi in proj.vi' with the LabVIEW Run-Time Engine version 25.1 (64-bit). The dependent file(s) 'vi in proj.vi' are a source-only component and its compiled code is not found in the compiled object cache.

      To troubleshoot the issue, either mass compile your code module VIs or try the following steps on the current machine:
      1. Open 'vi in proj.vi' in the LabVIEW development system. If the VI is broken, fix any errors in the VI.
      2. Force compile the VI by clicking the run arrow while holding the 'Ctrl' key.
      3. In LabVIEW, select File >> Save All to ensure that all subVIs are saved in the same LabVIEW version.

      Detailed log stored at 'C:\Users\admin\AppData\Local\Temp\TestStand\vi in proj_1.txt'

      Refer to the help for more information on executing VIs when using the Version Independent Runtime feature.

Solution

This issue in TestStand is due to a new feature introduced in LabVIEW 2024 Q3. This feature allows you to choose the save version for VIs. However, TestStand cannot handle this feature in versions 2024 Q3 and earlier, particularly when the source-only VI is within a project or library set to an older "save version".

This issue can be resolved by either disabling the Source Only VIs configuration or by turning off the Save Version VIs feature. Below are the steps for these solutions.

Disabling Source-Only VIs

If you're using LabVIEW 2021 or later, your VIs are set to be source-only by default. If you don't need your VIs to be source-only, you can unset this option. Please review the "From Which Files Do You Want to Separate Compiled Code?" section in the LabVIEW help to learn the different ways you can unset that option on different contexts.

Disabling the Save Version VIs

You can disable the default setting of this new LabVIEW feature using a global option before proceeding with mass compilation. Follow the steps below to achieve this:

  1. Clear the LabVIEW Compiled object cache by selecting the Tools >> Advanced >> Clear Compiled Object Cache menu option.
  2. If you have added any source-only VIs to user.lib or instr.lib under LabVIEW’s installation directory, then you might have to also delete the objFileDB.vidb file. It is located in one of the following directories, depending on your LabVIEW bitness.
    1. (32-bit) - C:\Program Files (x86)\National Instruments\LabVIEW 20xx\VIObjCache\objFileDB.vidb.
    2. (64-bit) - C:\Program Files\National Instruments\LabVIEW 20xx\VIObjCache\objFileDB.vidb.
  3. Disable the feature in LabVIEW by going to Tools >> Options, selecting the Environment category and unchecking Maintain the save version of loaded projects by default.
  4. Restart LabVIEW and mass compile (Tools >> Advanced >> Mass Compile...) all the folders where your LabVIEW files are present.

Additional Information

The feature in LabVIEW known as Defining the Save Version VIs which is automatically enabled, does not alter the Save version of the original source VIs. For instance, if a VI was last saved in LabVIEW 2021 and is a source-only VI, performing a mass compile in LabVIEW 2024 Q3 will maintain the source VI version as 21.0 but will update the compiled code of the VI in LabVIEW's compiled object cache.

When TestStand tries to open the VI, it still shows version 21.0, which causes a problem because the 21.0 LabVIEW RTE might not be installed on the computer. By default, the VIs require an exact match with their RTE version to run properly. This issue arises only if LabVIEW files are in source-only mode, which is the default setting from LabVIEW 2021 onwards.