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

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

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 chris.morgan | July 28 2014

Nice extension for a very needed feature.

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.

by Leonidas1 | December 06 2013

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


  • Replace transform doesn't appear to work during Windows application build
    2 Posts | Last post February 20, 2014
    • Ok, this time I've got my act together.  :)   I'm using SlowCheetah 2.5.10.3 in Visual Studio 2010 to transform a log4net config file to have a different server setting when doing Debug and Release builds of my application.  When I do a debug build, I need to connect to log4net server 'A'.  When I do a release build, I need to connect to log4net server 'B'.  In my diagnostic build output, I can see where SlowCheetah *does* report it does the transformation of the log4net config file. However, the generated log4net config file doesn't have the changes in it.
      
      My log4net.prod.config file contains:
      
      <?xml version="1.0" encoding="utf-8" ?>
      <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
      <appender name="Bob" xdt:Locator="Match(name)">
      <sink value="tcp://prodserver/sink" xdt:Transform="Replace" />
      </appender>
      </configuration>
      
      With the above transformation file, a SlowCheetah preview shows the above replacement transformation doesn't happen.  The source log4net config file and the prod version are the exact same.   If I change "Replace" to "Insert", I get an error stating "No element in the source document matches '/configuration/appender[@name='Bob']/sink'.  With the transform parameter specified as "Replace", I get a clean build but the transformation doesn't occur.
      
      I'm not build a web application and the source log4net config file doesn't have any xmlns attributes anywhere.
      
      Any ideas on why the "Replace" transform wouldn't work?
      
      Thanks!
      
      Tom
    • Man, this site is a great sound board for me!  :)
      
      I figured out my problem.  The problem was I needed to added a "<log4net>" element to the transformation file.
      
      So, I changed this:
      <?xml version="1.0" encoding="utf-8" ?>
      <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
      <appender name="Bob" xdt:Locator="Match(name)">
      <sink value="tcp://prodserver/sink" xdt:Transform="Replace" />
      </appender>
      </configuration>
      
      to this:
      <?xml version="1.0" encoding="utf-8" ?>
      <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
      <log4net>
      <appender name="Bob" xdt:Locator="Match(name)">
      <sink value="tcp://prodserver/sink" xdt:Transform="Replace" />
      </appender>
      </log4net>
      </configuration>
      
      Everything is working well now.
      
      Tom
  • TransformXml skipped due to false condition
    2 Posts | Last post February 20, 2014
    • I have a problem with log4net config files not being updated by SlowCheetah in Visual Studio 2010.  I'm using SlowCheetah 2.5.10.3.  When I look at diagnostic build output, I receive the message:
      
      Task "SlowCheetah.Xdt.TransformXml" skipped, due to false condition; (Exists('%(RelativeDir)%(Filename).$(Configuration)%(Extension)')
      and '%(Link)'!='' ) was evaluated as (Exists('Log4Net.Prod.config')
      and '' != '').
      
      I have two questions:
      
      1)  Where is SlowCheetah getting the "Prod" configuration from?  I'm using the "Release" build profile in Visual Studio 2010.
      
      2)  In the csproj file for my project, I see no references to a "<Link>" element but the log4net config file is referenced in a "<None>" element.  Clearly Slowcheetah is finding the log4net.config file to attempt the transformation but won't the fact that there is no <Link> element always prevent the transformation from happening?
      
      Thanks!
      
      Tom
    • Ok, since posting this, I answered my questions.  The above issue with the "<Link>" element isn't relevant to my problem at all.
      
      Nevermind.  :)
      
      Tom
  • How to add additional transform.targets file or custom TransformXml rule
    1 Posts | Last post February 11, 2014
    • Hi,
      
      Is it possible to add custom .targets file with additional TransformXml rules? How do I go on adding my custom transform rules (for example I need the transformed configs to be created in a different directory)? I guess its not good idea to update the SlowCheetah.Transforms.targets file as it is generated and can get overwritten, as says the warning. Or is what I am trying to do achievable without writing a custom rule?
      
      Thanks
      Sudeep
  • Transformation not published with VTSO projects
    1 Posts | Last post January 29, 2014
    • I have VS 2012 u4 with SlowCheetah 2.5.10 and with two VSTO projects (Outlook 2010 Add-in & Word 2010 Template) the transformation work as expected at runtime but not at publish time. I get an error about config “has a different computed hash than specified in manifest” when trying to install the published project and when I look at the config.deploy file it is not the transformed config.
      
      I also done a Windows Forms Application project and everything is working as expected with that project so it let me think that this issue is only affecting VSTO projects.
  • Publishing transformed configs for all build configurations
    2 Posts | Last post January 28, 2014
    • Really like SlowCheetah, but there is one scenario which I couldn't get working out of the box.
      
      I have a web.config with the following transforms/configurations:
      Dev
      Test
      Acc
      Prd
      When I publish for Dev, only the Dev transform gets applied and put into the web.config.
      This is the standard behavior.
      
      What I actually want to do is build/publish once and deploy on any of the machines.
      After publish I want the resulting web.configs to look like this:
      Web.Dev.Config (transformed web.config for Dev)
      Web.Test.Config (transformed web.config for Test)
      Web.Acc.Config (transformed web.config for Acc)
      Web.Prd.Config (transformed web.config for Prd)
      
      Is this possible out of the box? Or do I need to change my build scripts manually?
    • Hi AranV,
      
      Did you ever figure out or get a response for this scenario?
      
      Thanks.
  • 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.
21 - 30 of 230 Items