Executing a VI Before or After a Build

Pre-build VIs and post-build VIs automate actions before or after you build a LabVIEW build output from a build specification for supported application types.

  • Pre-build VI—VI that runs before a build.
  • Post-build VI—VI that runs after a build.
  • You can execute a VI before or after a build for the following types of build outputs:

    • LabVIEW:
      • Stand-alone application
      • .NET Framework assembly[1]1 Prior to LabVIEW 2025 Q1, .NET Framework assemblies were called .NET interop assemblies.
      • Shared library
      • Packed library
      • Source distribution
    • LabVIEW Real-Time Module: stand-alone real-time application
    Table 42. Example Use Cases for Pre-Build VIs and Post-Build VIs
    VI Example Use
    Pre-build VI
    • Delete a specific file or all files in the destination directory.
    • Copy the latest versions of the VIs in a LabVIEW project from the source control to the local directory.
      Note Changes you make when VIs are open do not save. If you copy VIs from source control, make sure you close the VIs before you make a copy before a build.
    Post-build VI
    • Copy build files to a different location, such as an export directory, from where you save the build.
    • Run tests on the build files with a subset of inputs to test that the build returns the appropriate outputs.
    • Run the build files with operations for command line parameters to test the build.

    If the VIs you want to execute before or after a build do not already exist in the project, click the appropriate Generate VI button on the Pre/Post Build Actions page to create these VIs.

    1 Prior to LabVIEW 2025 Q1, .NET Framework assemblies were called .NET interop assemblies.