I'm trying to find a way access the build version of my deployment through the API. Currently I'm using TS 2011 but I plan to migrate to TS 2013 so I can wait until this migration if it is easier to achieve in 2013. Has anybody done anything like this in TS?
When you say build version, do you mean something specific to your deployment (such as "This is version 1.1 of my deployment") or the TestStand build version? You can access the TestStand build version with Engine.VersionString. This would give you something along the lines of: 2013 (18.104.22.168).
The deployments themselves did not have a version in TS 2011, that was only added in 2013. I am guessing that you mean the installer version? To do that you have to use the GetFileVersionInfo API on the generated installer. I have not tested this class, but .NET has a helper class to do that (which you can use from the sequence editor, for example): FileVersionInfo.
The deployment version itself is only available in 2013 or later and unfortunately there is no easy way to access it without reading the TSD file. I will create a ticket to make the deployment version available in future versions of TestStand.
I hope this helps,
You can be sure that this is working in TS2013, I am already using this API function.
And felt into the gap when saving backwards to TS 2012. As the the blue-ones this only supported since TS2013.
please forget my upper answer!!
Your asking for deployment built version.
I have answered for TestStand built version!!!
Thanks for the reply. I'd like to add a little more to this. I'm using Perforce and I'd like to use the minor change increment to match the changelist number in perforce. If I can access this through the API then I can attache a TS deployment build to the Job data in my database. This gives me a way to link the build version, source version to the job I'm running.
When you say you will create a ticket to make this available in future versions of TS I hope you mean it could be available in TS 2013 SP1. In anycase thank you for your response.
I need to add I'm not using TS2011, I'm currently using TS2010 SP1. There actually isn't a TS 2011 right? In anycase I don't need to set this up in 2010 as I'm not locked into this version
We don't have a deployment version in TSDU in 2010 SP1, we only added that in 2013 (in order to simplify the creation of patches, so that you could always tell that patch 1.0.4 would upgrade full distribution 1.0.3 and not the other way around). However, we do have an installer version, if that is the version you want you can get it from setup.ini located next to the generated installer (located in %userprofile%\Documents\TestStand Deployment\Installer by default) . This is just a text file which stores information for the EXE. The version will be located under the Distribution tag and the field is called Version:
Hope this helps,