So I have installed the very latest version of SlowCheetah (3.0.61.18192 as of the time of this post) and I've added a "Test" build configuration alongside the "Debug" and "Release" build configurations.
Then I was able to add "Web.Test.config" to an already existing collection of "Web.Debug.config" and "Web.Release.config".
In my Web.Test.config I am trying to replace the entire 'configuration' section by telling SlowCheetah to xdt:Transform="Replace" the entire configuration section (at the top of the file).
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform" xdt:Transform="Replace">
To verify that my "Web.config" indeed got transformed to whatever's in "Web.Test.config" I've added a simple app setting to "Web.Test.config".
<appSettings>
<add key="configFile" value="IIS.config"/>
</appSettings>
Then on page load I try to read this setting and show if it has been found or not:
string setting = WebConfigurationManager.AppSettings["configFile"];
if (string.IsNullOrEmpty(setting))
{
lbl1.Text = "Not found.";
}
else
{
lbl1.Text = "Found!";
}
However when I select "Test" build configuration and hit F5 to debug I get "Not found." message.
So my question is why isn't SlowCheetah transforming my Web.config to Web.Test.config on the fly when I hit F5 and not picking up that custom app config setting? Basically I am trying to use SlowCheetah to debug my code with custom "Test" configuration by asking it to pickup the settings from "Web.Test.config" instead of regular "Web.config". (I also verified that my C# code is reading the configuration variable properly).
What am I doing wrong? or am I not understanding something? According to this link, SlowCheetah is supposed to support this: https://marketplace.visualstudio.com/items?itemName=WillBuikMSFT.SlowCheetah-XMLTransforms
Thanks.