trigger config transformation in TFS 2010 or msbuild
Posted
by grenade
on Stack Overflow
See other posts from Stack Overflow
or by grenade
Published on 2009-12-08T13:52:07Z
Indexed on
2010/05/12
2:04 UTC
Read the original article
Hit count: 564
I'm attempting to make use of configuration transformations in a continuous integration environment.
I need a way to tell the TFS build agent to perform the transformations. I was kind of hoping it would just work after discovering the config transform files (web.qa-release.config, web.production-release.config, etc...). But it doesn't.
I have a TFS build definition that builds the right configurations (qa-release, production-release, etc...) and I have some specific .proj files that get built within these definitions and those contain some environment specific parameters eg:
<PropertyGroup Condition=" '$(Configuration)'=='production-release' ">
<TargetHost Condition=" '$(TargetHost)'=='' ">qa.web</TargetHost>
...
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)'=='qa-release' ">
<TargetHost Condition=" '$(TargetHost)'=='' ">production.web</TargetHost>
...
</PropertyGroup>
I know from the output that the correct configurations are being built. Now I just need to learn how to trigger the config transformations. Is there some hocus pocus that I can add to the final .proj in the build to kick off the transform and blow away the individual transform files?
© Stack Overflow or respective owner