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

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

by schleeke | November 11 2013

by Eric A. Duesing | November 01 2013

by Christoffer Johnsson | November 01 2013

Very nice tool, keep up the good work.

FYI to all people that get's build errors and use Ncrunch. You must include the package in Ncrunch, else you will get build errors.

http://tech.pro/blog/1586/making-ncrunch-build-projects-that-use-slowcheetah

Version 2.5.10.1 works well with ncrunch, version 2.5.10.2 and 2.5.10.3 doesn't.

by ankgupta067 | November 01 2013

facing error -
Error 1 The "SlowCheetah.Xdt.TransformXml" task could not be loaded from the assembly C:\Users\SESA254846\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10\SlowCheetah.Xdt.dll. Could not load file or assembly 'file:///C:\Users\SESA254846\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. ConsoleApplication2

by WorkAByte | October 22 2013

amazing, cant believe I haven't found this sooner!
thanks for the simply awesome plug in

by e.sabbadin | September 19 2013

It works in vsnet 2012, but NOT on the TFS build server. I did not installed the plugin on the built server
I expected that the plugin was required only in the configuration phase, not to trigger the magic
, that is that it used the native xmltrasform features .. isn0t it the case ?

Sayed-Ibrahim-Hashimi September 21 2013
| Edit |
Delete

Hi e.sabbadin, when you install SlowCheetah into a project there is a message in the package manager console regarding build server support. Because of the way NuGet package restore is implemented there is some additional steps that need to be taken. You can read more info on how to enable that at http://sedodream.com/2012/12/24/SlowCheetahBuildServerSupportUpdated.aspx.

by Ed Schimmel | September 13 2013

It really annoys me that after an upgrade Slow Cheetah suddenly stopped working. In the first instance I was really pleased with this tool, but I can not use it when it is this buggy. It is a shame that there are no other tools doing the transformations, as far as I know.

Sayed-Ibrahim-Hashimi September 14 2013
| Edit |
Delete

Did you file a question in Q&A regarding your issue?

FYI please don't expect each release to be bug free. This is a one man project so I rely on the community to help in reporting issues when they arise.

by Mohammad Azis Fatoni | September 13 2013

by Pbsharper | September 06 2013

Highly recommended!
Used it for polyglot (f# c#) project. Worked without a hitch!

by zendu | September 06 2013

Release 2.5.7.1 simply sucks. It cannot even build project by throwing error - Could not copy the file"...exe.config" because it was not found.

PS: I wonder why there is no way to download earlier versions. It would at least made it easy to downgrade. With corporate firewall blocking NuGet packages, I am left with no options but to uninstall SlowCheetah and wait for next release that will fix the issue. So bad!

Sayed-Ibrahim-Hashimi September 14 2013
| Edit |
Delete

Sorry I had some issues with 2.5.7.1. Things should be better with 2.5.8, can you try and let me know? FYI regarding installing older versions you can always use the NuGet package manager console to install a specific version of the build support.

by Rihan Meij | August 21 2013

One of my essential tools for creating automated builds.
Thanks for making this so easy.

by Dave Moyle | July 30 2013

Ran inside TFS Build perfectly

by Lion The King | July 24 2013

by 40a | July 18 2013

by Charlie Shen | July 17 2013

by Cuzzlor | July 12 2013

Bloody awesome - thanks!

by wayward wayfarer | July 11 2013

by MichaelLWest | June 21 2013

Using this for a Sitecore project with TDS. Simply awesome.

by Johan van Tonder | June 12 2013

Excellent!

A tribute: http://www.youtube.com/watch?v=G7g11ViJnU0

Happy coding!

by Brad Rem | May 30 2013

21 - 40 of 111 Items   
Sign in to start a discussion


  • PropertyGroup location in the project file might break the transformation !!
    1 Posts | Last post July 07, 2014
    • After hours of debugging trying to understand why SlowCheetah stopped working after updating to the last Nuget package I discovered that if the "SlowCheetah" PropertyGroup is at the end of the csproj file, file transformation stops working.
      If I move it to the top, it works.
      
      It stopped working because when I updated the Nuget package, the PropertyGroup has been removed from the csproj file and added back, but at the end.
      
      After more research, it seems that the "SlowCheetah" PropertyGroup must be before the following import (the reason being obvious when you know it ^^) :
      <Import Project="$(SlowCheetahTargets)" Condition="Exists('$(SlowCheetahTargets)')" Label="SlowCheetah" />
      
      Could you do something about that ?
      It's a quite hard issue to identify and a simple package update might break SlowCheetah...
  • xdt:Locator example
    2 Posts | Last post July 01, 2014
    • Hi Sayed,
      
      I'm using slow cheetah to manage a custom XML file.  The elements that I want to update/replace don't have an attribute assigned for me to be able to use the xdt:Locator="Match(Attribute)" type of syntax.  
      
      Can you point me to an example/sample of xdt:Locator that does not use the Match syntax?  I've tried using Xpath statements but not having any luck - maybe I'm doing something wrong?
    • Clarification to my question above, if my XML file is formatted as below:
      
      <?xml version="1.0" encoding="utf-8" ?>
      <Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform" xmlns="http://tempuri.org/Configuration.xsd">
      
      
      
        <!--Sample Service1
        *************************************************************-->
        <ConfigSection Service="Service1">
          <ConfigPoint>
            <ConfigName>ConnectionString</ConfigName>
            <ConfigValue>##ConnectionVariable1</ConfigValue>
          </ConfigPoint>
          <ConfigPoint>
            <ConfigName>OutputFilePath</ConfigName>
            <ConfigValue>HardCodedValue</ConfigValue>
          </ConfigPoint>
        </ConfigSection>
      
      
      
        <!--Sample Service2
        *************************************************************-->
        <ConfigSection Service="Service2">
          <ConfigPoint>
            <ConfigName>ConnectionString</ConfigName>
            <ConfigDescription/>
            <ConfigValue>##ConnectionVariable1</ConfigValue>
          </ConfigPoint>
        </ConfigSection>
      
      
      
        <!--Sample Service3
        *************************************************************-->
        <ConfigSection Service="Service3">
          <ConfigPoint>
            <ConfigName>ConnectionString</ConfigName>
            <ConfigDescription/>
            <ConfigValue>##ConnectionVariable2</ConfigValue>
          </ConfigPoint>
          <ConfigPoint>
            <ConfigName>AuthenticationGroup</ConfigName>
            <ConfigValue>##AuthenticationVariable1</ConfigValue>
          </ConfigPoint>
        </ConfigSection>
        
      </Configuration>
      
      I would like to use Xpath locator to find all instances where ConfigValue = ##ConnectionVariable1 and replace with a new value in the transform.  I'm having difficulty with how to leverage the locator syntax to accomplish this.
      
      Thanks!
  • Failing Team Foundation build with v2.5.10.6
    3 Posts | Last post June 12, 2014
    • Hi I've been using SlowCheetah for over a year.  Awesome, thanks!
      
      However I've run into an issue I need help with please. Apologies it's not a one line question...
      
      The scenario is that in a solution which uses the "old" NuGet package restore (NuGet.exe and targets file checked into source control, no packages checked in), SlowCheetah v2.5.10.6 does not work on my Team Foundation Build server.  This is the actual error I get on the build server:
      
      C:\Builds\11\PaulSlowCheetahTest25105\Properties\SlowCheetah\SlowCheetah.Transforms.targets (153): The "TransformXml" task could not be loaded from the assembly C:\Builds\11\PaulSlowCheetahTest25105\Properties\SlowCheetah\SlowCheetah.Xdt.dll. Could not load file or assembly 'file:///C:\Builds\11\PaulSlowCheetahTest25105\Properties\SlowCheetah\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.
      
      The \Poperties\SlowCheetah dir of course just has the targets file inside.
      
      I have another solution using v2.5.10.3 with NuGet package restore and that is fine. It seems a recent change since 10.3 has introduced this issue.
      
      I searched the web and found this:
      
      https://github.com/sayedihashimi/slow-cheetah/issues/116
      
      At then end of the comments lucusc says: "What fixed it for me was to change how Nuget was restoring packages from the old way (right click solution and click Enable Nuget Package Restore) to the new preferred way. See the 2 links below for more details."
      
      However, using Automatic Package Restore poses other issues for me as my build workflow is customised from an earlier TFS version so I can't use the new TFS2013 build workflow which has Package Restore built in.
      
      Can you suggest a way forward? 
      
      
      
      
      
    • I see a few possible options at the moment:
      
      1. Stick with the "old" NuGet package restore, and install older SlowCheetah v2.5.10.3 which does work OK on my build server.
      
      2. Move to Automatic Package Restore, with latest SlowCheetah, but use this workaround to force the Package Restore to happen before the solution is built: http://blogs.msdn.com/b/dotnet/archive/2013/08/27/nuget-package-restore-with-team-foundation-build.aspx
      
      3. Move to Automatic Package Restore, with latest SlowCheetah, and modify my Team Build workflow to run the NuGet Package Restore before doing the solution build.
      
      None of these options are particularly attractive to me.  I guess 3 is the right way to go but I don't relish the idea of tinkering with the TFS build workflow.
      
      I'd be keen to hear your thoughts!!
    • FYI I went with option 3 in the end.  So updated my build workflow to do a NuGet restore before the MSBuild.  When I looked into it I found a "NuGetRestore" workflow activity so it was pretty simple to achieve.  I hope this helps somebody else!
  • Conflict with VS 2013 Git integration
    3 Posts | Last post May 29, 2014
    • The transforms work as expected for me, but they have broken the Git integration in Visual Studio so that I cannot .gitignore any of the transformations (or at least, when I do, I can't use Visual Studio's git integration). 
      
      I need *.Debug.config files to be ignored, because they have developer specific configurations that should not be committed. 
      
      This is caused by the ms-persist.xml file that SlowCheetah puts within the .git folder, which Visual Studio then uses as an override to the .gitignore file.
      
      There are various work-arounds to this issue, but ultimately, I'd like SlowCheetah to not put that file into .git at all, so that I can manage my ignores.
      
      Example: 
      new project in Visual Studio, and in a git repo.
      Transform app.config.
      Add "app.Debug.config" to .gitignore and save everything.
      Observe:
        In Visual Studios "Team Explorer" window, the app.Debug.config shows as a pending change that needs to be committed. 
        In Git command line, git status does not show app.Debug.config as a pending change.
      
      
    • Like many others here, we're seeing Slow Cheetah fail. It has been working in our web app for several months, allowing us to have different configs, one for release, one for cloud. It would be really nice to have it run on F5, but we can live with it for now.
      
      However last week it suddenly started throwing errors in our build, the MSI is still created but we're getting messages about Slow Cheetah dll not being found. In Visual Studio 2010, I can right button click and "Preview Transform" and it does show me the before and after. However it no longer works when we publish to Azure (we use VS2010 on a deployment box to do that - too small a team to have a dedicated build manager).
      
      Similarly, the regular "Release" transform no longer works on the build server.
      
      I think the time has come for Microsoft to adopt this tool, which is basically sound, and give it the support it deserves.
      
    • SlowCheetah doesn't create those files. Please file a bug with Microsoft at http://connect.microsoft.com
  • Transformations and Embedded Resource
    4 Posts | Last post May 12, 2014
    • Hi Sayed,
      
      I have an xml file as an embedded resource to be used for nhibernate configuration. I would like to embed the transformed file as the embedded resource rather than the original. Since the transformed files are copied in to the relative bin\$(Configuration) the build will and does include the non transformed file as the embedded resource. I was wondering if there is a simple way using "Slow Cheetah" to get the transformed file included as the embedded resource.
      
      One way would be to run the transforms before the build begins and add the xml file as a Link from the bin\$(Configuration) so that you always get the transformed file rather that the original.
      
      --Thanks
    • Hi Kamran, thanks for your feedback. This is not supported but you could always use the TransformXml task directly in your project files to realize such scenarios. 
    • Hello Sayed and Kamran,
      
      I am not at all familiar with msbuild tasks, but I also have the need to transform embedded .resx files and .settings files.  Do either of you have suggestions how to modify the .csproj file to accomplish this?
    • Hi guys,
      
      I also need to transform embedded resources. Could you shed some light on how to accomplish this?? Thanks!
  • Error slowcheeta.transforms.targets MSBuildLibPathLocal
    1 Posts | Last post May 12, 2014
    • Hi,
      I tried to build an asp.net project including slowsheetah 2.5.10.3 version and i got the following build error:
      
       error MSB3191: Unable to create directory "C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10.2\"
      
      Although the slowcheeta files are not located there.
      
      When i replaced the line in the slowcheeta.transforms.targets file:
      $(LocalAppData)\Microsoft\MSBuild\SlowCheetah\v2.5.10.2\
      with 
      $(MSBuildProjectDirectory)\..\packages\SlowCheetah.2.5.10.3\tools\
      
      it works!
      so, are you going to modify your that file or i miss something to be added?
      
      fyi: similar issue at: https://github.com/sayedihashimi/slow-cheetah/issues/118.
      
      Thanks!
      
  • Copy transformed config to cloud package
    2 Posts | Last post May 06, 2014
    • Hello,
      
      i testing your package. It's great!!!
      
      One question, when I package a worker role it doesn't copy the transformed App.config to the package. How can i fix it?
      
      Best regards,
      
      PD: I'm using visual studio 2013 (update 1)
    • Hello,
      
      I fixed the problem! 
      
      Best regards,
  • SlowCheetah doesn't work with Windows azure Web/worker Role projects
    1 Posts | Last post April 22, 2014
    • Hi,
      
      I would like to bring to your notice that SlowCheetah is not working with Windows azure related cloud projects.
      Is there any alternative for the same.
      
      Thanks,
      Karthik
  • SlowCheetah doesn't work with custom transformation expression
    3 Posts | Last post April 16, 2014
    • Nor effective transformation nor transform preview works when I use your custom extended transformation attribute described at http://sedodream.com/default,date,2010-09-09.aspx which indeed works like acharm ;).
      
      Here is the result of the build :
      Build started 21/06/2012 17:21:32.
      ResolveAssemblyReferences:
        A TargetFramework profile exclusion list will be generated.
      GenerateTargetFrameworkMonikerAttribute:
      Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
      _CopyAppConfigFile:
      Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files.
      CopyFilesToOutputDirectory:
        ConsoleApplication1 -> d:\rzetelny\Visual Studio 2010\Projects\ConsoleApplication1\bin\Debug\ConsoleApplication1.exe
      TransformAllFiles:
        Transforming Source File: d:\rzetelny\Visual Studio 2010\Projects\ConsoleApplication1\App.config
          Applying Transform File: App.Debug.config
      d:\rzetelny\Visual Studio 2010\Projects\ConsoleApplication1\App.Debug.config(10,10): error : Could not resolve 'AttributeRegexReplace' as a type of Transform
      d:\rzetelny\Visual Studio 2010\Projects\ConsoleApplication1\App.Debug.config(14,10): error : Could not resolve 'AttributeRegexReplace' as a type of Transform
        Transformation failed
      
      
      Is there a way to make them work together ?
    • This is not currently supported but I have this on my backlog at https://github.com/sayedihashimi/slow-cheetah/issues/6.
    • Hi,
      
      Will custom transforms be supported any time soon?
      
      Thanks.
  • Config files as link.
    1 Posts | Last post April 16, 2014
    • We have a shared config file across multiple projects, We use a link to the Root App.config file and another CustomConfig.config file which are used all over the place when i click on AddConfig Transforms it shows me a dialog box. 
      
      "Add as linked configs?" 
      
      Press yes then it says 
      
      "Object reference not set to an instance of an object." 
      
      Any idea on what could be happening at this point?
      
      Kind Regards
      Vinay.
1 - 10 of 230 Items