Error -19047 in TestStand Deployment Utility During Build Process for LabVIEW Project with JSON Toolkit

Updated Jul 31, 2024

Reported In

Software

  • TestStand
  • LabVIEW

Issue Details

I'm using the TestStand deployment Utility based on my TestStand Workspace, which contains the LabVIEW project based on the JSON toolkit with Source Distribution. 
I press the Build button to start the building process. It starts but after some minutes it fails and gives me error -19047.

LabVIEW uses a file with the same name as one of the destination files, National Instruments recommends that you close LabVIEW before you build a deployment.

Error 19047 Labview using same file.jpg

Even if I close the LabVIEW the error won't disappear. 

Solution

TestStand Deployment Utility handles adding JSON toolkit differently with the source distribution. When it says name in the error message, it means the full qualified name (FQN) of certain VIs. You can have two VIs called MyVI.vi, but LabVIEW will understand they are different if they are in different libraries. 

LibA.lvlib > MyVI.vi is different from LibB.lvlib > MyVI.vi

The same happens for VIs with class members with the same name but within different LabVIEW Classes

ClassA.lvclass > MyVI.vi is different from ClassB.lvclass > MyVI.vi

Nevertheless, you can also use Source Distribution, as long as you set the option to include the JSON files in a new LabVIEW Library.

Define a JSON Lib folder to accommodate all the TestVI.vi dependencies (in this case JSON Lib but it has other libs too). In addition to that, create a new LabVIEW project library and add all files dropped in the JSON Lib folder to it. This will allow LabVIEW to differentiate files.

image

The best practice recommends pulling all dependencies of your code module into the project and then properly separating them and grouping them in different libraries in the build specification. 

By properly configuring the source distribution build specification, you should be able to build the deployment image, installer, and other components successfully.

image

Additional Information

Another way to address this issue is to use Packed Project Libraries (PPL) instead of Source Distribution. If you create a PPL, put your code module, and include all dependencies, they'll automatically get a different FQN.
  • Find the required libraries from the LabVIEW Project Dependencies,
  • Add them to the project,
  • Create a Packed Project Library by including the Library files.
  • Include the PPL in the TestStand Workspace 
Once you have included the PPL in the TestStand Workspace, you will be able to successfully deploy the project using the Deployment Utility.