1
votes

I've looked over several suggestions for getting SlowCheetah transforms to work with Visual Studio Online's build system, but nothing seems definitive, especially for the Visual Studio 2015 world.

I have a web project with both build configurations and publish profiles in place. If I'm using the one-click publish, everything works as expected; first the build config transform fires, then the publish profile config transform. However, on VSO, only the web.config is transformed, and then only for the build configuration.

The goal would be to provide the build definition on VSO with the build configuration and publish profile to use (which I know can be provided via MSBuild) and trigger the transforms to work as appropriate. I'm using the new VSO build definitions that are done online through the web interface (not the XAML ones), and the good news is this has an option to restore NuGet packages automatically (which has been one of the issues in the past). It looks like other MSBuild steps could also be added, so maybe there's a way to trigger the process after the build or something.

Has anyone gotten this to work properly? Thanks.

1
Build-time configuration transforms are a bad practice. Configuration files should be constructed at the time of release, ideally off of a template with little to no variance other than environment-specific settings. This helps ensure consistency when testing the application in lower environments.Daniel Mann
@DanielMann That's literally the point of the transform, to produce a tokenized file where the configuration can be re-written during the release.EKW

1 Answers

3
votes

I did a quick test on this but didn't see any issue.

The screenshot for my project: enter image description here

And the screenshot for my build definition: enter image description here

After the web project is published with these settings, I can get the "Web.config" and "XMLFile1.xml" transformed with the "edd" profile and "XMLFile2.xml" transformed with build configuration.