This package enables you to transform your app.config or any other XML file based on the build configuration. It also adds additional tooling to help you create XML transforms.. Written by: Sayed Ibrahim Hashimi, Chuck England and Bill Hiebert
Terrific work -- the only problem with web.config can be solved with a little trickery (http://stackoverflow.com/questions/16225304/using-slowcheetah-config-transforms-on-web-config-in-a-3-5-web-forms-app).
Very useful. I like that it looks at the Publish Profiles, although be cautious when you rename a Profile, it does not rename the previously generated transform files. But you can always regenerate and delete the old.
Simply does not work with ClickOnce. I have not found any information that shows how to make XML transformations work with ClickOnce. You can run the transform preview and it looks correct, but the .config.deploy file generated by ClickOnce is the original, untransformed config file. Very frustrating and completely unusable in my situation.
A real must if you wish to deploy to different machine with different configuration settings stored inside some other [filename].config. Still wonder why Microsoft don't have this functionality out of the box.
I spent an afternoon trying to get this going for a team project. After a fair while thrashing with the already-mentioned "The SlowCheetah.Xdt.TransformXml" task could not be loaded from the assembly" problem, I eventually solved it by deleting the %localappdata%\Microsoft\MsBuild\Slowcheetah folder and it semed to resolve itself on my local machine and I was allowed to build and run stuff. I then deployed this to my colleagues who didn't have the plugin, under the impression that the NuGet package would make everything alright. No joy, regardless of what I tried. I'm now having to see if I can hand-roll a solution for changing config settings for people. Gets 2 stars because I like the idea and it kind of worked on my machine.
I have a web.config file which refers a bunch of external config files using configSource attribute on the configuration elements. I would like to know if there is a way to transform this web.config file using either "web transformations" or "slow cheetah" or any other method, so that each of the environments (Staging/QA/UAT) will pick up a different external config files ?
<add name="DBCon1" connectionString="...." providerName="System.Data.SqlClient" />
<add name="DBCon2" connectionString="...." providerName="System.Data.EntityClient" />
<add name="DBCon1" connectionString="foo" providerName="System.Data.SqlClient" />
<add name="DBCon2" connectionString="bar" providerName="System.Data.EntityClient" />
I want to know if there is a way to make the Web.config to point to Release.config file when the Release Configuration build is triggered from VS ?
Thanks in advance.
Hey guys. I've installed this tool at my last 2 jobs in VS2010, however, I can't seem to get it working with VS2012. IS there something different that needs to be done, or something I can check to make sure it installs correctly?
If I try to reinstall, it tells me that it has been installed for all applicable products
I just upgraded to 2.5, and now my publish fails with following error. Publish was working before upgrade.
AppData\Local\Microsoft\MSBuild\SlowCheetah\v1\SlowCheetah.Transforms.targets(170,11): Error MSB4057: The target "CoreCopyTransformFilesWap" does not exist in the project.
There may be a bug here, see my comment at <a href="https://github.com/sayedihashimi/slow-cheetah/issues/52">https://github.com/sayedihashimi/slow-cheetah/issues/52</a> for a method to revert back to the previous version until I can fix it.
I have a unit test assembly that has a app.config, which has multiple configurations config files setup. I've installed SlowCheetah 2.5.1. When I compile and run the unit test assembly, the dll gets copied to the appropriate bin folder but the transform has not been performed on the app.config file. Is there anything I can check to see if I've done something wrong?
I am running the unit tests locally, there is no CI process involved at this stage.
When I use VS2012 and preview the Transforms they all look good and work as expected.
I have the following XML in my transform file, and when it replaces the defined setting, the closing "</value>" tag is wrapped down to the next line and my setting value has a "\r\n " tacked on the end of the email address. Any idea what is causing that?
<setting name="FinanceEmailAddress" serializeAs="String" xdt:Locator="Match(name)" xdt:Transform="Replace">
I've updated to the latest (2.5) and now all config files except for web.config do not transform on a publish using VS2012. My publish profile name is the same as the transform file suffix (Publish1 and myconfig.Publish1.config). The transform preview works correctly. The previous version was working fine with the publish profiles I created. The published config files are not modified in any way (they still retain the original last modified date). I also used the vsix from issue 46 and the transform did not occur.
Can you give specific steps? I just tried the following and it worked.
1. Create a new project
2. Add transform details to web.debug.config/web.release.config
3. Add foo.xml
4. Add Transform on foo.xml
5. Add transform details to foo.debug.config/foo.release.config
6. Publish to an Azure Web Site using MSDeploy
From what I can see it looks like its working
File System publish for web only supports extensibility from the command line. When publishing from VS the same extensibility doesn't exist in the UI. So there is nothing SlowCheetah can do here. For this the best thing to do is open a bug at connect.microsoft.com.
I am unable to get the "Add Transform" context menu item to appear for existing and new test projects, and am hoping someone out there has experienced a similar issue.
I'm running Visual Studio 2010 on Windows 7, and have the latest version of NuGet (2.1.31002.9028) installed (I install SlowCheetah via Solutions Explorer>Manage NuGet Packages).
I've tried starting VS as follows:
1) "devenv.exe /log" but that did not produce helpful info.
2) "devenv.exe /SafeMode" but experienced the same problem
3) As an administrator
I am having problems getting the endpoint on my app.config to do a transform that changes the address ( really the whole tag) in my windows service using the latest SlowCheetah 2.4.1 and using Visual Studio 2010. This is for a Windows Service .NET 4.0.
Do to size restrictions, I am removing the endpoint binding info I use the following code for the regular app.config:
<endpoint address="http://developmentServer/WebServices/MasterEngine/MasterEngineService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMasterEngineService" contract="OverlayFarEnd.IMasterEngineService" name="BasicHttpBinding_IMasterEngineService"/>
And the app.Release.config is as follows:
<endpoint address="http://productionServer/WebServices/MasterEngine/MasterEngineService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMasterEngineService" contract="OverlayFarEnd.IMasterEngineService" name="BasicHttpBinding_IMasterEngineService" xdt:Transform="Replace" xdt:Locator="Match(name)">
I have tried adding the client tag outside the endpoint, removing it etc...
The weird thing is that the connectionString does the transform, but the endpoint does not. Any ideas? I'm going off matching the name and i've copy and pasted it to each place to make sure it is correct.
Thanks in advance :(
I'm having the same problem.
I have 3 config files. app.Debug.config, app.Staging.config and app.Release.config.
Each of these files must point to a different service endpoint but it doesn't seem to be working.
Here's my original app.config:
<?xml version="1.0" encoding="utf-8"?>
<binding name="BasicHttpBinding_IInHouseService" />
contract="InHouse_LOCAL.IInHouseService" name="BasicHttpBinding_IInHouseService" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0.3" />
<assemblyIdentity name="PresentationFramework" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-126.96.36.199" newVersion="188.8.131.52" />
<assemblyIdentity name="Lucene.Net" publicKeyToken="85089178b9ac3181" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-184.108.40.206" newVersion="220.127.116.11" />
Here's my app.Staging.config:
contract="InHouse_LOCAL.IInHouseService" name="BasicHttpBinding_IInHouseService" xdt:transform="replace"
Nice tool. It simplifies the process of kicking off automation runs in different environments, without the need to edit the app.config file. I have just a couple of issues with it:
- I can't debug different environments without editing the debug app.config. I wouldn't otherwise even need an app.debug.config file.
- When switching configuration and rebuilding, I get an error message that a test with the same id as (insert random test case) has already been loaded in the test editor.
- When debugging a web performance test, if I open the test case to watch the results while the test is executing, Visual Studio crashes. Since I can't debug a data driven web performance test case without opening to watch it execute, this is a major problem. I never had this problem before installing slowcheetah, so it is my prime suspect.
I have two xml files. 1. The source file. 2. The file that should be after applying the transformation. Is it possible to generate the SlowCheetah transformation xml by comparing these two files?