I'm using the default process template that comes with TFS 2013 and I have a post build script that runs after the build is done. The script is a Powershell script that copies over some files required for me to generate an MSI. What I want to know is how to retrieve information about my build such as the MSBuild Arguments that I stated. I need to get the value that I set in the build definition. Is there a way that I can access this without writing functions that go on TFS and retrieve the build definition information?
-
Out if interest, what are you using to generate the MSI? IF you're using WiX you can add a wixproj to your solution. I believe that other packaging tools such as install shield also offer similar functionality. Then the MSI creation becomes part of your regular build process.James Reed– James Reed2014-10-09 12:28:24 +00:00Commented Oct 9, 2014 at 12:28
Add a comment
|
1 Answer
Quite a few of the TFS variables get defined as environment variables. See these example scripts: https://tfsbuildextensions.codeplex.com/SourceControl/latest#Scripts/GatherItemsForDrop.ps1 Here is the environment variable reference: http://msdn.microsoft.com/en-us/library/hh850448.aspx While that doesn't contain an env var for MSBuild arguments, you can always pass the same arguments to your PowerShell script via the post-build script arguments process parameter.
1 Comment
Nerd in Training
Thanks. I wanted to avoid this. Seeing as though this can be tricky, I've considered writing a function in a module, but it seems like a lot of work. I'll have to think of a different way around my problem. I'm just going to delete this question