I have TFS On-Premises 2015 and I would like to transform app_config/include files with SlowCheetah on build using TFS, but I am running into some issues.
Existing Solution
First, we already have a solution in place where we created an Environment_Config\$(Environment)
folder which overwrites the appropriate app_config/include
files on deploy to specific environments.But this results in config duplication and it would be much cleaner to perform transforms like we do with Web.config
Issue(s)
We are using SlowCheetah 3.0.6 and there are a couple of issues.
1) The final app_config/include
directory also has the environment config files in there which results in Sitecore picking them up and applying those settings when looking at /Sitecore/Admin/ShowConfig.aspx
. How can I get rid of the environment specific transform files so they are not included in the final build artifact?
2) On build, when I look at the original config file, the transforms haven't been applied at all. When I publish using Visual Studio, it works fine but on build the transform doesn't happen. I've looked at another StackOverflow question that suggested removing the condition in C:\Users\Users\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.11\SlowCheetah.Transforms.targets
:
<BuildDependsOn Condition=" '$(IsWap)'!='true' ">
$(BuildDependsOn);
TransformAllFiles;
ScReplaceAppConfigItem;
</BuildDependsOn>
but instead I set IsWap = "False"
as my build MSBuild argument. But the transform still doesn't occur. Apparently, this variable is used to determine when to perform the transform in SlowCheetah but I'm not sure this is applicable since it seems to be for SlowCheetah v2. How can I get SlowCheetah to transform on build using TFS? What else can I try?