NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand Deployment Utility desn't set version from command line TS2023, TS2022 64-bit

Solved!
Go to solution

Is anyone recently been using 64-bit TestStand deployment utility for setting the deployment version from command line utility? 

 

I find BuildTSD.exe builds the package successfully but doesn't set the version number that I need. My command is as below and 

BuildTSD.exe versionString "1.0.0"  "path\to\my\TSD.tsd"

 

 I have attached a version 2022 & 2023 sample zip files for reference

--
Ajay MV


Download All
0 Kudos
Message 1 of 7
(122 Views)
Solution
Accepted by topic author Ajay_MV

Ajay, I suspect that the the default settings in the Advanced section is overriding your parameter:

Scott_Richardson_0-1714148480683.png

 

If you uncheck the lock option, it will likely work as expected. I would uncheck the auto increment option too.

Scott Richardson
Message 2 of 7
(72 Views)

Thanks Scott.  That was the exact issue. 

 

 

I'm now facing with another issue that I always get exit code 2 and so the build fails in bitbucket 

Ajay_MV_0-1714456516146.png

 

The log file shows as unbale to open file, but I the build is generated successfully though.. 

Ajay_MV_1-1714456723115.png

I'm playing around x86 and x64 TS versions to deal with this, seems this is not an issue with x86.  Any directions could be helpful.

 

 

 

--
Ajay MV


0 Kudos
Message 3 of 7
(51 Views)

Ajay, no idea. Looking at the BuildTSD.exe Exit Codes the value of 2 suggests something aborted the build, so the message that there was a file that failed to open makes sense. You might be able to use Microsoft's Process Explorer utility to determine what files are being opened and what TSDU might not like. The utility might show something near the end of the build that might be suspect.

Scott Richardson
0 Kudos
Message 4 of 7
(42 Views)

Scott,

 

I noticed in the log file, there are three sections for deployment (Deployment1, Deployment2, Deployment3).  Seems actual deployment build log is in Deployment2 section.. .Deployment1 & Deployment3 shows not_built status.  I'm not aware of how this section shows up and whereabouts in .tsd configuration.  Any idea?  I persume this what causing the build to give Exit Code 2.

 

Ajay_MV_0-1714559382360.png

...

Ajay_MV_1-1714559408541.png

Regard,

Ajay

 

--
Ajay MV


0 Kudos
Message 5 of 7
(34 Views)

I eventually found exit code 2 occurs due to setting environment file in both command line and also in the .tsd file as I explained in this thread https://forums.ni.com/t5/NI-TestStand/Deployment-Utility-Command-Line-returned-exit-code-in-spite-of...

 

I had to remove environment file from .tsd file and uncheck the box "Use Environment File To Determine Deployed File Destinations" to get rid of error code 2.

--
Ajay MV


0 Kudos
Message 6 of 7
(22 Views)

Ajay, I have never looked at the build log. Basically there are three <deployment> sections in the XML and that is what is being displayed. The 1st loads the TS Env file, the 2nd builds the deployment, and the 3rd shuts down the process. Not sure what the XML is organized that way.

 

I see nothing in the log that suggests why you are getting a 2 return code. I tried building a TSD that configures a TS ENV file in the TSD for both a MSI installer and a Package Installer and I got the error 2 as well. I think this is a BuildTSD.exe bug.

 

If you do not configures a TS ENV file in the TSD, the return code is 0.

 

(I will let someone I know at NI about this)

Scott Richardson
0 Kudos
Message 7 of 7
(17 Views)