learnerplates
learnerplates

Reputation: 4387

How can I get the current build flavor?

What variable can I use to get the current build flavour? i.e. Release or Debug

I'm trying to copy files which exist in release or debug folders, so I need to know which ones are currently beign created i.e am I in Release or Debug.

TF2010 scripts gave me access through ConfigurationToBuild.FlavorToBuild properties which I used to set in my script but these no longer evaluate.

e.g.

<Message Text="Move all Assemblies from $(DropLocation)\$(BuildNumber)\%(ConfigurationToBuild.FlavorToBuild) to $(DropLocation)\$(BuildNumber)\bin\%(ConfigurationToBuild.FlavorToBuild) "></Message>

Upvotes: 0

Views: 542

Answers (1)

Mark Arnott
Mark Arnott

Reputation: 1994

From your <Message> tag in the example it looks like you are working inside an MSBuild project file. For that use the $(Configuration) variable.

If you are inside a projects post build event, use $(ConfigurationName)

Update: The $(Configuration) comes from your .sln and project (.csproj or .vbproj) files. The .sln includes different solution configurations which govern project configurations. So it is possible to have one project build with a 'Debug' configuration and another project build with a 'Release' configuration as part of the same solution build.

Upvotes: 2

Related Questions