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

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

by dittodhole | Thu 11:38 AM

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

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


  • Problem in v2.5.10.3 ?
    1 Posts | Last post January 09, 2014
    • The SlowCheetah.Transforms.targets file that gets added seems to have an entry to v2.5.10.2 (Note .2!!)  
      
      Is this a mistake?
  • VS 2013
    1 Posts | Last post December 17, 2013
    • Is this supported in VS2013?
  • Missing reference
    2 Posts | Last post December 03, 2013
    • Hello
      
      I just downloaded the project from github and I'm trying to get it to compile. I've installed Visual Studio SDK and the NuGet packages but I get an error on the reference Microsoft.VisualStudio.ComponentModelHost (version 10.0.0.0). I guess it's because I use VS2012 (and thus VS2012 SDK, version 11.0.0.0). Are you still using VS2010? Is there a way around it so I can still use VS2012 or do I need to go back to VS2010?
      
      I've been using SlowCheetah for quite some time so I suppose I should help out with the development ;)
      
      /Chris
    • Finally got it to work. Had to do the following:
      
      Install VS2010
      Install VS2010 SDK
      Install VS2010 SP1
      Install VS2010 SDK SP1
      Install VS2012
      Install VS2012 Update 4
      Install VS2012 SDK
      
      Open the solution and download the missing Nuget packages.
      
      And you're all set!
      
      /Chris
      
  • Jenkins and Automatic Package Restore
    7 Posts | Last post November 26, 2013
    • The Jenkins service is running under the Local System account. Can it be that Automatic Package Restore is not correctly installing the SlowCheetah files in the AppData folder? The build is looking for them there, but can't find them:
      
      Project "C:\Tools\Jenkins\jobs\Test1\workspace\Build.msbuild" on node 1 (default targets).
      RestorePackages:
        "C:\Tools\Jenkins\jobs\Test1\workspace\.nuget\NuGet.exe" restore "C:\Tools\Jenkins\jobs\Test1\workspace\TestMain.sln"
      [..]
        Installing 'SlowCheetah 2.5.10.3'.
        Successfully installed 'SlowCheetah 2.5.10.3'.
      [...]
      "C:\Tools\Jenkins\jobs\Test1\workspace\Applications\TestMvc\TestMvc.csproj" (default target) (11) ->
      (TransformAllFiles target) -> 
        C:\Tools\Jenkins\jobs\Test1\workspace\Applications\TestMvc\Properties\SlowCheetah\SlowCheetah.Transforms.targets(150,5): error MSB4062: The "SlowCheetah.Xdt.TransformXml" task could not be loaded from the assembly C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10.2\SlowCheetah.Xdt.dll. Could not load file or assembly 'file:///C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10.2\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. [C:\Tools\Jenkins\jobs\Test1\workspace\Applications\TestMvc\TestMvc.csproj]
      
      I checked with explorer and there is no AppData folder available under the Local System account.
      
      Regards,
      Marcel
    • PS: I'm using SlowCheetah v2.5.10.3 and this is my build script:
      
      <?xml version="1.0" encoding="utf-8"?>
      <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
          <PropertyGroup>
              <OutDir>$(MSBuildThisFileDirectory)_Output</OutDir>
              <Configuration>Release</Configuration>
              <ProjectProperties>
                  OutDir=$(OutDir);
                  Configuration=$(Configuration);
              </ProjectProperties>
          </PropertyGroup>
      
          <ItemGroup>
              <Solution Include="$(MSBuildThisFileDirectory)*.sln" />
          </ItemGroup>
      
          <Target Name="RestorePackages">
              <Exec Command="&quot;$(MSBuildThisFileDirectory).nuget\NuGet.exe&quot; restore &quot;%(Solution.Identity)&quot;" />
          </Target>
      
          <Target Name="Clean">
              <MSBuild Targets="Clean"
                       Projects="@(Solution)"
                       Properties="$(ProjectProperties)" />
          </Target>
      
          <Target Name="Build" DependsOnTargets="RestorePackages">
              <MSBuild Targets="Build"
                       Projects="@(Solution)"
                       Properties="$(ProjectProperties)" />
          </Target>
      
          <Target Name="Rebuild" DependsOnTargets="RestorePackages">
              <MSBuild Targets="Rebuild"
                       Projects="@(Solution)"
                       Properties="$(ProjectProperties)" />
          </Target>
      </Project>
    • Sorry, I meant that there is no MSBuild folder under
      C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft
    • I've installed the version 2.5.10 and it doesn't work anymore. Please fix or let me download the 2.5.9.1 version.
      
      Error	9	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.	
      
    • Error	42	The "SlowCheetah.Xdt.TransformXml" task could not be loaded from the assembly C:\Users\MYUSER\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10\SlowCheetah.Xdt.dll. Could not load file or assembly 'file:///C:\Users\MYUSER\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.	
      
    • Just some extra info... I found the following folder (it's a x64 system):
      C:\Windows\SysWOW64\config\systemprofile\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10.2
      But it has no content inside :-(
    • Just noticed: version number of the package (v2.5.10.3) does not match the version number in the installed/searched path (v2.5.10.2). Don't know if that can cause this problem...
  • 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?
  • 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.
41 - 50 of 242 Items