How can I access to my Build Process parameters into the Pre-Build / Post-Build script. I cannot pass it in argument because I need to prompt the user to ask him the version number before queuing this Build. I have try with $env:MyVariableName but it is empty.
Asked
Active
Viewed 586 times
1
-
Can you better articulate "I cannot pass it in argument because I need to prompt the user to ask him the version number before queuing this Build" ? – Giulio Vian Jan 20 '15 at 09:25
1 Answers
0
If when he queues the build, he can provide the version number, that version number can become an input parameter in the process template that is then passed as a parameter to the powershell activity that then passes it to your script, which can then be accessed via Param($version).
But, if you still need to directly access the build definition process parameters, you need use C# and the TFS API as with this:
How to Deserialize and Serialize Build Process Parameters in TFS

Community
- 1
- 1

Brandon Hawbaker
- 534
- 5
- 5