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

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

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 | June 26 2014

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.

by tomKober | June 24 2014

Works like a breeze. :)

by dkehring | June 24 2014

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.

by Henrick P | June 19 2014

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.

by marcelnita | May 22 2014

Great!

by Brad Deem | May 08 2014

Excellent! Glad to see this come to projects other than web. Now if only Microsoft would pick it up out the box...

Just remember to verify that it works without SlowCheetah installed so other devs don't have issues. Here's what I've used before.

<PropertyGroup Label="SlowCheetah">
<SlowCheetah_EnableImportFromNuGet Condition=" '$(SC_EnableImportFromNuGet)'=='' ">true</SlowCheetah_EnableImportFromNuGet>
<SlowCheetah_NuGetImportPath Condition=" '$(SlowCheetah_NuGetImportPath)'=='' ">$([System.IO.Path]::GetFullPath( $(MSBuildProjectDirectory)\..\packages\SlowCheetah.2.5.8\tools\SlowCheetah.Transforms.targets ))</SlowCheetah_NuGetImportPath>
<SlowCheetahTargets Condition=" '$(SlowCheetah_EnableImportFromNuGet)'=='true' and Exists('$(SlowCheetah_NuGetImportPath)') ">$(SlowCheetah_NuGetImportPath)</SlowCheetahTargets>
</PropertyGroup>
<Import Project="$(SlowCheetahTargets)" Condition="Exists('$(SlowCheetahTargets)')" Label="SlowCheetah" />

by SegaWang | April 26 2014

great transform tool. Thanks a lot

by CloudKarthik | April 22 2014

SlowCheetah doesn't work with Windows azure Web/worker Role projects.

by maskey | April 17 2014

by Mathias Colpaert | April 01 2014

SlowCheetah might be a bit buggy to set up, but once it works its great!

by Micky D | March 28 2014

Conflicts with ReSharper 8.1. Had to Suspend and Resume Resharper because I could not edit any file after applying a template

by Craig Brett (JP) | March 25 2014

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.

by Daniel Castenholz | February 07 2014

Nice integration with VS. Makes a chore much more manageable.

by Spesimensen | January 30 2014

Excelent tool! Thank you very much.

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


  • VS 2013 not transforming web.config in debug
    3 Posts | Last post November 21, 2013
    • I have a Web.Debug.config file that logs to a debug log file instead of the release version. In VS 2010, after I upgraded to the extension version 2.5.10, it would no longer transform web.config in debug mode. After I installed the NuGet SlowCheetah package 2.5.5, then would it start working again (installing the latest SlowCheetah NuGet did not work).
      
      After upgrading to VS 2013, even with using SlowCheetah NuGet 2.5.5, it's no longer transforming web.config in debug mode. I also tried NuGet package 2.5.10.3 and it still doesn't work. The Preview Transform function shows the correct transform being applied.
      
      Any help would be greatly appreciated.
    • For web projects the web.config transforms are invoked on package/publish, not on build. 
    • Any options to make the transform happen on local build as well? This will allows individual developer to override the team settings in the web.config.
  • Error on build
    1 Posts | Last post November 19, 2013
    • We are encountering the following error on many computer, we just downloaded the latest version, and we are trying it on VS2013:
      
      The "SlowCheetah.Xdt.TransformXml" task could not be loaded from the assembly C:\Users\Ahmad\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10\SlowCheetah.Xdt.dll. Could not load file or assembly 'file:///C:\Users\Ahmad\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.
      
      We tried to search the path, there is two folders:
      C:\Users\Ahmad\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10.2; this contains the vs extension,
      C:\Users\Ahmad\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10; this contains a copy of my project !!! what is that?
  • Build error caused by SlowCheetah v2.5.10
    5 Posts | Last post November 19, 2013
    • I am getting the following build error
      
      Error 28 Could not copy "bin\Debug\app.config" to "C:\Users\ara\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10\bin\Debug\app.config". Exceeded retry count of 10. Failed.
      
      If I delete all files (except 2 files) in 
      
      C:\Users\ara\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10
      
      then I can build the project. However, after that I cannot build another project in the same solution
      
      Error 17 Could not copy the file "bin\Debug" to the destination file "C:\Users\ara\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10\bin\Debug", because the destination is a folder instead of a file. To copy the source file into a folder, consider using the DestinationFolder parameter instead of DestinationFiles.
      
      Why is this happening? It seems like the SlowCheetah is trying to write the projects output to the same directory.
      
    • Can you upgrade the SlowCheetah NuGet package to 2.5.10.3? That should fix things.
    • I updated, but the transformation is not working anymore. The option "Show transform" is not shown.
    • I don't know if this is relevant, when I run install-package SlowCheetah I get the following:
      
      PM> install-package SlowCheetah
      'SlowCheetah 2.5.10.3' already installed.
      [ProjectName] already has a reference to 'SlowCheetah 2.5.10.3'.
      Failed to generate binding redirects for '[ProjectName]'. 'Microsoft.Tools.WindowsInstallerXml.VisualStudio.WixProjectNode' does not contain a definition for 'References'
    • Great tool! One problem though: When you try to transform a root-element Visual Studio tells me: Could not write Destination file: Object reference not set to an instance of an object.
      
      I'm using VS2012 Update 3 and SlowCheetah 2.5.10.3 (NuGet package). An example of my config file (Invoice.Debug.config):
      <?xml version="1.0" encoding="utf-8" ?>
      <InvoicePaymentService xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform" cancelUrl="http://mysite.nl/winkelen/geannuleerd/" returnUrl="http://onderwijsadvies.preview.gengu.nl/winkelen/bedankt/" debug="False" testMode="True" xdt:Transform="Replace">
      </InvoicePaymentService>
      
      I've tested it with multiple config files and settings. Re-created the transforms etc...
  • Problem with files copying to 2.5.10 directory
    5 Posts | Last post November 13, 2013
    • Not sure if the installer got botched, but after upgrading to 2.5.10 from 2.5.9.1, our test machine began to copy files into a C:\Users\user.x.name\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10 directory.  The files it copied were the project files that were being built. I was able to work around the issue by defining the SlowCheetahToolsPath in the SlowCheetah.Transforms.targets file to define the tool path.  Is there something I can do so I don't have to hack the targets file manually in order to get SC to work?
    • Can you try after a VS restart and let me know if you still have issues?
    • After both a VS restart and machine restart, SC is still creating a v2.5.10 directory next to the v1 directory in the user profile\local\microsoft\msbuild\slowcheetah directory.  The contents of the directory seem to be all of the project files for any project that contains transforms. They get copied over each other as a project with a transform is processed.  When I uninstall and reinstall SC, the problem persists.
    • I worked around this problem with a conditional Using in my SC tarets file.  Stick these two lines in @ line 36 in your C:\Users\<you>\AppData\Local\Microsoft\MSBuild\SlowCheetah\v1\SlowCheetah.Transforms.targets file.  The 2nd using will use the correct v1 location.
      
        <UsingTask TaskName="SlowCheetah.Xdt.TransformXml" AssemblyFile="$(sc-MSBuildLibPathLocal)SlowCheetah.Xdt.dll" Condition="Exists('$(sc-MSBuildLibPathLocal)SlowCheetah.Xdt.dll')"/>
        <UsingTask TaskName="SlowCheetah.Xdt.TransformXml" AssemblyFile="SlowCheetah.Xdt.dll" Condition="Exists('SlowCheetah.Xdt.dll')"/>
    • The second UsingTask solved my problem too. Thanks
  • Error when building with SlowCheetah (SlowCheetah.Xdt.TransformXml)
    7 Posts | Last post November 13, 2013
    • Hi,
      I'm getting the following error message when trying to use SlowCheetah 2.5.10:
      
      Error	45	The "SlowCheetah.Xdt.TransformXml" task could not be loaded from the assembly C:\Users\hrcorval\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10\SlowCheetah.Xdt.dll. Could not load file or assembly 'file:///C:\Users\hrcorval\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.TestSuitesUI
      
      
      This problem was not happening when using version 2.5.5, and it started happening after updating to this version.
    • Are you using Ncrunch?
      If you are you must include the slowcheetah package in Ncrunch.
      You didn't have to do this in verison 2.5.5
      
      http://tech.pro/blog/1586/making-ncrunch-build-projects-that-use-slowcheetah
    • And also another note, version 2.5.10.1 is the latest verison that runs well with Ncrunch. Version 2.5.10.2 and 2.5.10.3 causes the build error, even if you include the package :(
    • I'm not using Ncrunch yet, I'm just using NUnit framework. What I did was to install the SlowCheetah package from Visual Studio Gallery, add transforms in the configuration file and compile the solution. 
      I'm currently using VS Ultimate 2012 with .Net fwk 4.5
    • What issues are you having with 2.5.10.3? As far as I know most issues are fixed in 2.5.10.3.
    • I have been having a similar issue.  This was not fixed in the 2.5.10.3 install the files are not installed to 2.5 directory.
    • Me too.  Looks like a V1 folder was created at install and a V2.5.10 on build (saying "it looks like").  Copying the dll from the V1 folder to the V2.5.10 folder is a workaround.
  • 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.
31 - 40 of 231 Items