2

I have a build workflow in TFS 2013 that has a couple of custom parameters: TFS build parameters

The problem is that the value print by TFS is the following: Build output

How can I replace the MsBuild variable with its real value like I do for the Build version number?

rene
  • 41,474
  • 78
  • 114
  • 152
Raffaeu
  • 6,694
  • 13
  • 68
  • 110
  • Do you mean like the stuff in this post? http://stackoverflow.com/questions/9030328/how-to-pass-tfs-variable-to-a-msbuild-task-of-the-project or do you mean by passing /p in the build def? Not sure what you are meaning here. – Mike Cheel Oct 25 '13 at 12:56
  • Yes I meant the stuff in that post. So it's not replacing them automagically as I though ... – Raffaeu Oct 25 '13 at 13:10
  • Just to be clear, are you wanting to print the actual value of the variable in the log or are you wondering how to pass custom values to the build process? – Mike Cheel Oct 25 '13 at 14:03
  • I need to be able to have a parameter in the build Workflow that accepts MsBuild variables, like $(SolutionDir), $(Version) and able to parse those variables before the Workflow parameter is read. Like TFS does already for the MsBuild configuration property of the default Workflow – Raffaeu Oct 29 '13 at 10:31
  • I don't think there is a way to do this. From within the work flow you can access the BuildDetail object and from outside you can pass custom parameters. I don't think there is an 'eval' function that will tell TFS to parse msbuild commands from the commandline. You might be able to get away with something using the MSBuild task and writing an msbuild file on the fly or something. http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.build.workflow.activities.msbuild.aspx – Mike Cheel Oct 29 '13 at 13:31
  • did you find any solution? – yrahman Mar 01 '17 at 10:33
  • @yrahman it is not possible, I solved a while ago by moving my code into VSTS (TFS Online) and the new build system. – Raffaeu Mar 01 '17 at 10:38

0 Answers0