SlowCheetah - XML Transforms

Free

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

(127) Review
Visual Studio
2013, 2012, 2010
Download (192,177)
7/20/2014
2.5.11
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (127)
Q and A (245)
Sign in to write a review
Sort by:

by MGSman123 | Tue 3:19 PM

Excellent extension! Definitely essential to my VS toolbelt going forward. Works like a charm in VS2015 too. Just needed to tweak the vsextension xml inside the package :)

by Blue Ajaz | June 03 2015

by dittodhole | April 23 2015

by Tim Long | April 20 2015

5 stars, a genuinely useful tool whenever you need different connection strings, diagnostic logging (etc, etc) configuration for release vs. debug builds.

by MSreenath | March 17 2015

Hi Ibrahim,

Thanks for writing this great tool. I have a question regarding this tool.

Question 1:

How this tool will help if I am creating ONE setup project (msi project) for all my environments and have multiple configuration files ? How can I build and deploy in this case.

As far as I can see this tool works great if you are doing file copy deployment. It just does not make sense to create setup file (read msi) for each environment, if that route I am taking for this


Question 2:

I have 5 different applications (Three Console Applications, Two Windows Service and Two Web)

Can I keep a one master config file and update all these five applications without copying same settings to app.staging.confing likewise to all applications.

Again, it takes lot of time and create this tool, I myself struggled create such tool but it is far from the level you have reached.

Please let me know. I am waiting for your response.

Sree

by jhjhkl758 | March 12 2015

ddd

by Cosmin Vana | January 19 2015

by Victor Lindsey | January 16 2015

I really like this tool for Visual Studio (both 2010 and 2013), and cannot understand Microsoft's reluctance to adopt this as a standard feature for all future versions of the IDE.

I found that for me, using the VSIXinstaller for each edition of Visual Studio I'm using, worked well to get it installed. And I have to make sure that custom XML-styled configuration files are marked with "Copy always" or "Copy if newer".

by 程湘之間 | January 06 2015

It's a very good add-on for Visual Studio.
Maybe making a formal part of Visual Studio will be a good idea.

by Rehan Saeed | December 15 2014

Vote for this feature to be built into Visual Studio. Find out more here:

http://rehansaeed.co.uk/configuration-file-transforms-in-visual-studio-should-be-built-in/

by Omar Gameel Salem | December 08 2014

by Slammer17 | December 02 2014

Recently updated via nuget from :

<package id="SlowCheetah" version="2.5.10.3" targetFramework="net45" />


To



<package id="SlowCheetah" version="2.5.14" targetFramework="net45" />

and after this update, Slow Cheetah stopped transforming files within VS2013 Ultimate Update 4

I rolled back to 2.5.10.3 and it now works fine again.

by Josh Gallagher | October 15 2014

The simple mechanisms for replacing parts of XML that are used by
msdeploy on web.config are equally useful with any other config files.
SlowCheetah does a great job of extending that functionality in a
transparent way to other files.

by chris.morgan | September 04 2014

This extension has saved my countless hours setting up automated builds and continuous deployments. This is a must have if you need to do configuration file transforms during your build and deployment process.

by Gustin G | September 02 2014

Excellent tool - I use it in every project to achieve a clear configuration scenario.

by Thomas TwoAngel Rud Rasmussen | August 20 2014

Doesnt transforms, doesnt add new transforms, doesnt transform web.config as stated.

Soo, that's a no go im my environment

by Toons33 | July 21 2014

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).

THANK YOU SlowCheetah team.

by Victor Pascual Villanueva | July 15 2014

Making things a lot easier for Selenium testing across different browsers:

http://testingisland.wordpress.com/2014/07/10/how-slowcheetah-can-help-with-your-selenium-tests/

by Dmitriy N. Dokshin | July 08 2014

by Frank Fajardo | Thu 6:40 AM

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.

1 - 20 of 127 Items   
Sign in to start a discussion


  • Visual Studio 2013 Example
    3 Posts | Last post November 11, 2013
    • I'm new to SlowCheetah and was wondering if someone could provide a simple example for me. I've setup a simple C# app, and I added one setting to the settings called ServerName. In the App.Config file I see:
          <applicationSettings>
              <SCExample.Properties.Settings>
                  <setting name="ServerName" serializeAs="String">
                      <value>TheProductionServer</value>
                  </setting>
              </SCExample.Properties.Settings>
          </applicationSettings>
      
      I've right clicked on App.config and created the transform files and I see them. I'm having trouble with the syntax of the transform. I've tried several variations, but I think:
      
        <appSettings>
          <SCExample.Properties.Settings>
            <add key="ServerName" value="DevServer" xdt:Transform="Replace" xdt:Locator="Match(key)"/>
      OR:
            <add name="ServerName" xdt:Transform="Replace" xdt:Locator="Match(name)">
              <Value>DevServer</Value>  
            </add>
          </SCExample.Properties.Settings> 
        </appSettings>
      
      Should be correct but it's not working. What am I missing?
      
      Thanks in advance for your help!
      
      Best,
      
      -james
    • Okay, I figured it out:
      
        <applicationSettings>
          <SCExample.Properties.Settings>
            <setting name="ServerName" serializeAs="String" xdt:Transform="Replace">
              <value>TheDevServer</value>
            </setting>
          </SCExample.Properties.Settings>
        </applicationSettings>
      
      works. Is this the best way?
      
      -james
    • My example above is missing an xdt:Locator and will drive you nuts. here's some example transforms which are working for me:
      
          <SCExample.Properties.Settings>
            <!-- We don't want to change the Flow Through setting so nothing special has to be done -->
            
            <!-- To Delete a setting, use the Transform Remove -->
            <setting name="DeleteThisSetting" xdt:Transform="Remove" xdt:Locator="Match(name)"/>
      
            <!-- To Change a Setting, use the Transform Replace -->
            <setting name="ATweakedSetting" serializeAs="String" xdt:Transform="Replace" xdt:Locator="Match(name)">
              <value>This Setting was tweaked in app.debug.config</value>
            </setting>
            
            <!-- To Add a Setting, Use Transform Insert-->
            <setting name="AnotherAddedSetting" serializeAs="String" xdt:Transform="Insert">
              <value>This Setting was added in app.debug.config.</value>
            </setting>
            
            <!-- if you want to get REAL picky on where it goces, use Insert After -->
            <!-- The xpath expression does the heavy lifting -->
            <setting name="AnotherAddedSettingPlacedAfterServerName" serializeAs="String" 
                     xdt:Transform="InsertAfter(//setting[@name='ATweakedSetting'])">
              <value>This Setting was added in app.debug.config.</value>
            </setting>
      
  • does not create the extra project 'restorePackage.proj'
    2 Posts | Last post November 07, 2013
    • Basically I'm trying to integrate into build process on TFS and I'm following instructions from a blog post you had.  It is not showing the extra project that you are mentioning in the post.
      
      Please see question on StackOverflow.  
      
      http://stackoverflow.com/questions/19549934/slowcheetah-workaround-for-tfs-build-integration-not-working-as-expected
    • Hi Cootmonster, you no longer need that file. Just build your project, you don't have to worry about package restore anymore. I moved the .targets file into the project itself.
  • Transform which doesn't depend on configuration.
    2 Posts | Last post November 07, 2013
    • Is it possible to create transform that doesn't depend on configuration?
      I need to make transform for localization purposes.
      I have file Data.xml and I need a transform Data.ru-RU.xml which will replace some values in source file and produce output localized file Data.ru-RU.xml
      
      This means that I need original file Data.xml to be included in project as well as translated one Data.ru-RU.xml
    • SlowCheetah won't help you in this situation. You could do this by writing some MSBuild that calls the TransformXml task.
  • Just upgraded to 2.5.10 and Azure Role Build now breaks
    8 Posts | Last post November 07, 2013
    • Hi!
      
      Love the product, and have been using it for a while with great success.  After an update today though my Azure Worker Role project no longer builds with the following error:
      
      Error	21	The "SlowCheetah.Xdt.TransformXml" task could not be loaded from the assembly C:\Users\idrennan\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10\SlowCheetah.Xdt.dll. Could not load file or assembly 'file:///C:\Users\idrennan\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10\SlowCheetah.Xdt.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.	InternalServices
      
      Could you provide any guidance as to the cause?  Also, below is the relevant line(s) in my .proj file that seem to now be causing the issue:
      
        <PropertyGroup>
          <SlowCheetahTargets Condition=" '$(SlowCheetahTargets)'=='' ">$(LOCALAPPDATA)\Microsoft\MSBuild\SlowCheetah\v1\SlowCheetah.Transforms.targets</SlowCheetahTargets>
        </PropertyGroup>
        <Import Project="$(SlowCheetahTargets)" Condition="Exists('$(SlowCheetahTargets)')" />
      
      
    • This is the error that my colleague was experiencing. I bet if you look in that directory (C:\Users\idrennan\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10) you'll find a copy of the project files you were building at the time the build failed.
    • Can you try restarting VS and trying again? I think that should solve things.
    • @Ian Drennan:
      It seems that necessary files are placed at %APPDATA%\..\Local\Microsoft\MSBuild\SlowCheetah\v1. Copy files from the folder to %APPDATA%\..\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10.
      List of files:
      Install-Manifest.xml
      Microsoft.Web.XmlTransform.dll
      SlowCheetah.Tasks.dll
      SlowCheetah.Transforms.targets
      SlowCheetah.Xdt.dll
      
      This solved the problem you stated for me. However, I continue to get following error, for which I have not found any solution:
      
      The "SlowCheetah.Xdt.TransformXml" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Windows\Microsoft.NET\Framework\v4.0.30319" directory.
    • Hey, if you are running Ncrunch then it's causing the build error.
      Install version 2.5.10.1 (important to get that version cause verison 2.5.10.2 and 2.5.10.3 doesn't work) of slowcheetah and include the package in Ncrunch and it will work again. :)
      
      http://tech.pro/blog/1586/making-ncrunch-build-projects-that-use-slowcheetah
    • So following Zendu's suggestion worked (this is a clan install computer btw).
      
      I copied the files from the v1 folder to the v2.5.10, restarted VS, and then it seemed to work.
      
      Sayed-Ibrahim-Hashimi - hopefully this gives you enough info to troubleshoot/fix the issue.
      
      Thanks all!
    • I'm also experiencing same problem after installing SlowCheetah in fresh environment (VS2013, Windows8.1). 
    • Sorry to hear about the issues. Most of these issues should be fixed if you upgrade your SlowCheetah NuGet package to 2.5.10.3.
      
      @Christoffer, what issues are you having with 2.5.10.3?
  • SlowCheetah WCF app.config Transform on Publish
    1 Posts | Last post October 30, 2013
    • Can SlowCheetah transform app.config for WCF projects when published using the file publish method. 
      I currently have Version 2.5.10 installed and it does not appear to be transforming an publish for my WCF project.
  • Transform Without Having to Recompile per Configuration
    6 Posts | Last post October 29, 2013
    • Hi,
      
      We have multiple target environments (DEV/QA, etc.). Since the only things that change are configuration settings (nothing done with precompilation statements) we'd rather not have to have a configuration per environment; seems like a waste to recompile for each environment since the code is the same. We'd also like to minimize the customization of the SlowCheetah.Transforms.targets file. Is there a recommended way to compile the code once and get SlowCheetah to create transformed config files for multiple environments?
      
      Thanks in advance
    • Hello Santos,
      Did u find a way to solve ur problem? I am having the same kind of problem. Several environments and when i do a debug, the webconfig is not transformed to the environment that i want.
    • No, I haven't. I was hoping to get a reply from Sayed but never did. I know I could do it by customizing the targets file to use a custom variable like $(Environment) instead of $(Configuration) but I was hoping to not customize anything so that I wouldn't have to revisit the targets file to check for possible conflicts.
      
      Overall, I do like SlowCheetah I just really dislike how it and XML Transforms overall are married to build configurations. The binaries for us are not different per environment. The only thing that is different is just the configs. We currently use XML Preprocess and so far, I'm thinking we're going to stick to it.
    • This is exactly the problem I'm experiencing. I'm trying to overcome the problem by only referencing the SlowCheetah target, but that doesn't work:
      MSBuild [path to project file] /t:TransformAllFiles /p:Configuration=Release
      
    • Sorry for the delay here SlowCheetah doesn't cover this scenario. There is another similar tool that you may be interested in. Check it out at http://ctt.codeplex.com/.
    • I found a pretty decent work around for this, while still using SlowCheetah.
      I created some afterbuild events:
      <TransformXml Source="web.config" Transform="Web.Staging.config" Destination="webstaging.config" />
          <TransformXml Source="web.config" Transform="Web.Release.config" Destination="Webrelease.config" />
      		<SlowCheetah.Xdt.TransformXml Source="config\umbracoSettings.config"
                        Transform="config\umbracoSettings.Release.config"
                        Destination="config\umbracoSettingsRelease.config" />
      
      With the devops tool we are using (Buildmaster) The files are renamed and replaced on the correct environments.
      It's not ideal, but you still have central config files (web.config and umbracoSettings.config), and you only have to manage the changes in the XMLtransform files.
  • Incorrect build configuration on cloud services deployment
    3 Posts | Last post October 28, 2013
    • I deploy my cloud services solution with Visual Studio 2013 (Azure SDK 2.2 + SlowCheetah). I created new build configuration 'config_name' besides standard Debug and Release and I use it in my publish profile. But when I start deployment I see SlowCheetah (I guess) uses Release config:
      
      Transformed Web.config using C:\...\Web.Release.config into obj\Release\TransformWebConfig\transformed\Web.config.
    • ok, this is really important - I have staging deployment and production version of my cloud app. When I deploy staging it's important to have a connection string point to STAGING db and have all other things configured differently (Twilio, sendgrid, etc). Now I can't have it bacause my Debug config is for local development, Release is for Production, and the one that doesn't work is for Staging. So I basically have a hard time deploying and testing my solution.
    • ok, solved this myself. I opened configuration manager and under build everything were selected as Release. Changed this to 'config_name' and it worked (well, i had to do this in csproj and sln files manually, but that's another story).
  • VS 2012 / Azure 2.1 - not transforming?
    2 Posts | Last post October 22, 2013
    • I'm using VS 2012 and Azure Tools 2.1 with SlowCheetah.  I downloaded & installed the VS extension and everything seemed to go fine: I was able to create Debug and Release versions of the app.config for my worker role.  I added transforms and checked them with "Preview Transform".  All good.  But when I build -- nothing.  Transforms haven't been done.  Am I missing something?  Is there somewhere I can look to see if the transform failed or get some logging data on what's happening?
    • It looks like I needed to install the SlowCheetah.xdt nuget package as well.  Seems to be working now.
  • Only publish transformed files
    1 Posts | Last post October 17, 2013
    • Hey,
      
      I'm looking for a way to use msbuild together with slowcheetah to produce/publish *only* the transformed files.
      I tried
      MSBuild [path to project file] /t:TransformAllFiles /p:Configurat
      ion=Release
      
      That doesn't give any errors, but it doesn;t give me my files either.
      I think because SlowCheetah only transforms on publish.
      
      I tried some other options as well, but to no avail.
      Please help?
  • Could not copy the file"...exe.config" because it was not found.
    7 Posts | Last post October 17, 2013
    • I'm receiving the error:
      
      Could not copy the file "bin\Debug\TIPS.Client.exe.config" because it was not found.
      
      I'm not alone
      
      http://michaelsync.net/2013/08/30/slowcheetah-clickonce-issue
      
      If I simply create a new WPF application and enable "Enable ClickOnce security settings" I get the error.
      
      Thanks
    • I've created an app that illustrates the problem
      
      https://github.com/xsdconsulting/SlowCheetahTest.git
      
      VS 2012 update 3
      installed VS slowcheetah expansion
      create wpf 4.5
      enable ClickOnce security
      add transform
      buid
    • As mentioned below, downgrading to version NuGet package 2.5.5 fixed the issue.
    • Thanks for the details, I am able to repro this now.
      
      I've created an issue on the project page at https://github.com/sayedihashimi/slow-cheetah/issues/108. Let's followup there.
    • This should be fixed in 2.5.8.
    • I'm having the same Problem with Version 2.5.9.1, VS2013 Update 3 in an WPF-Application. Added the transform, did some transformations, preview is working fine, but building the release gives me the error described here. Click Once Security is enabled.
    • Ok sorry, If I choose Tools/Extensions and Updates it tells me I have 2.5.9.1 installed. As building is not working I uninstalled the package from my project and recognized I had 2.5.7 there. So I uninstalled it (which didn't work right away) and installed it (why 2.5.8?) again. Now its building!
51 - 60 of 245 Items