08-30-2011 02:11 PM
I am creating a deployment and I'd like to add the deployment version to the report when a sequence executes. I know how to add the sequence file version. Does anybody know how to get the deployment version progmatically?
08-30-2011 10:32 PM
What do you mean by deployment version?
08-31-2011 05:45 AM
Hi,
Do you mean this:
08-31-2011 07:14 AM
Yes Ray, that is whay I am looking for. I had a couple of ideas: within the build process create an Custom Command that generates a file with the version number that I can look for and read in the sequence. Otherwise, I would guess it will take some .NET assembly property read to get the version value.
Also, I thought about generating an Idea on the exchange to have the Sequence File verions to increase when it is built. It could be linked to the Major revision for example.
08-31-2011 10:03 AM
The sequence file doesn't know that it's part of a deployment as I'm sure you already know. I think it would be a bad idea to rev the seq file if the deployment builds it. Because not everyone uses the TestStand deployment tool to deploy. Also, people might be expecting the sequence file to be a certain version when really it gets changed by the deployment. I guess though if you gave them a checkbox then they could choose between the two.
Yes you will have to read the ProductVersion property from the .msi using .NET (read more on msdn). I recommend storing it to a txt file and reading it in. That would be the simplest. Even still you cannot know for absolute that the sequence file came from that deployment. Because someone can just replace the sequence file with their own mods and you wouldn't know. Hence I think it is better to use the Sequence File versioning. Or go off the modified date.
A shared drive approach is also an interesting method:
http://zone.ni.com/devzone/cda/tut/p/id/7061
I'm sure you've read that though. And some times that's not feesible.