0

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?

1
  • 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. Commented Oct 9, 2014 at 12:28

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.