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

(70) Review
Visual Studio
2012, 2010
Download (69,280)
2/23/2013
2.5.5
View
E-mail Twitter del.icio.us Digg Facebook
Add To Favorites
Description
Reviews (70)
Q and A (164)
Sign in to Write a Review
Sort By:

by Philippe Truche | May 08 2013

Excellent tool. Maybe the next Visual Studio Service Pack will include it so that it becomes an out of the box feature.

by Brad Deem | May 03 2013

by Zahid Iq | April 30 2013

excellent !!
a long awaited extension

by straightener | April 09 2013

We had several self-inflicted wounds with accidentally testing applications that had config entries that pointed to production instead of the quality assurance environment. Because of this we searched and found Slow Cheetah that let us separate the configs into Development, QA, and Production. Things are a lot safer now. Thanks for creating this.

by rovsork | March 19 2013

This just makes life that much easier.
Powerful and simple, and it gives you a feature that feels so natural you would thought it was already there!

by arcainatwork | March 14 2013

This extension is one of the most useful in my toolbox. If MS doesn't roll this functionality into VS, it could be considered a crime.

by Damian Penney | March 06 2013

This works really well - exactly what I was looking for. Thanks guys!

by Daniel Mackay | March 05 2013

Watched the Visual Studio Toolbox video on this some time ago, but have only just installed it. The tool is great and Its saving me heaps of time! No more building and deploying just to diff config files. Thanks for the work on this extension!

by bargz | March 04 2013

This an a most excellent extension. Very helpful to preview and publish configuration transforms for development, test and production environments.

by Caio de Arruda Campos | March 03 2013

Awesome! Exactly what we needed.
Love how it creates files for each publish profile as well as debug/release.

by Jaybirdbsu | February 26 2013

I love the way this works on the build servers!

by Yuri Shpakov | February 16 2013

Hi,

That is a cool stuff. That is to be installed on a develoer computer (VS). But how can I install on build server? Do you have any installation program for that?

Thank you

Sayed-Ibrahim-Hashimi February 17 2013
| Edit |
Delete

Hi Yuri, see my blog post at http://sedodream.com/2012/12/24/SlowCheetahBuildServerSupportUpdated.aspx regarding how to get it working for build servers.

by James Alexander | February 04 2013

Thank you so much for adding support for Azure Worker Roles!

by Erick Mendonça | January 25 2013

It's cool, but does not work for web.config as good as it works for app.config.

Sayed-Ibrahim-Hashimi February 02 2013
| Edit |
Delete

It's on the backlog https://github.com/sayedihashimi/slow-cheetah/issues/39. Should be the next major feature I work on. For web projects this support is much trickier than non-web projects.

by Mike Gledhill | January 09 2013

Excellent. My app.config's are now updated with a Test, PreProd or Prod SQL Server connection string, even when running (rather than Deploying) my apps. A lifesaver - thanks!

by Emilio Gordo | December 07 2012

by rhizohm | December 04 2012

a life saver. thanks guys! great implementation!

by Dave Sexton | November 24 2012

by El Bruno | November 13 2012

Great tool !!!

by Citronas | November 04 2012

Awesome! I'm just so used to web.config transforms in ASP.Net applications that I also want this functionality in a WinForms Application.

Your add-in works like a charm. Keep up the good work. I hope this add-in will be included into VS 2012 sometime in the future, just like they did with Nuget.

Even debug sessions are effected by the transform, depending on the selecte d solution configuration! Really nice work.

Sayed-Ibrahim-Hashimi November 24 2012
| Edit |
Delete

It won't be included in VS2012, and at this time it likely wont ever make it into VS. If you think it should I suggest you make a suggestion at http://visualstudio.uservoice.com/ and have all your friends vote it up.

1 - 20 of 70 Items   
Sign in to Start a Discussion


  • Instructions so Build Server also transforms the config files
    2 Posts | Last Post June 07, 2012
    • I have a Build Server, and every night it will automatically build the solution for 2 different configurations (Staging and Testing).  It then publishes those, so the respective teams can test and explore the latest changes.
      
      Is there anything I need to do so the Build Server transforms my config files correctly?
    • I have blogged about how to do this at http://sedodream.com/2011/12/12/SlowCheetahXMLTransformsFromACIServer.aspx.
  • Transform configs copied in package
    2 Posts | Last Post June 07, 2012
    • I have ConnectionStrings.config and two tranforms:  
          ConnectionStrings.Staging.config
          ConnectionStrings.Snapshot.config
      
      When I build the deployment package, the transforms are applied correctly.  The problem is, all 3 files are included in the package instead of just a ConnectionStrings.config.
    • Hi Jason, I just replied back to the other thread that you are on here titled "ASP.NET publish leaves debug and release versions". Let's discuss this there.
  • .settings files
    4 Posts | Last Post June 02, 2012
    • Is it possible to transform a .settings file?  We use these to hold DB Server and DB name information to run Integration Tests.
    • Further details: I can create the transforms by right-clicking on the main .settings file, but when running the tests it always takes whatever connection strings are setup in the main .settings file rather than the .debug.settings file.
    • .settings files do not work with Transforms. We had a discussion here regarding those at http://visualstudiogallery.msdn.microsoft.com/69023d00-a4f9-4a34-a6cd-7e854ba318b5/view/Discussions/4#3944. The issue is that .settings files are converted to code so transforms won't work due to that.
    • FYI I have created an issue at https://github.com/sayedihashimi/slow-cheetah/issues/13 to modify the behavior to not show the Add Transform command for .settings files.
  • Preview Tranforms wothout modifying Project file
    2 Posts | Last Post June 02, 2012
    • Is it possible to preview the transform without modifying .csproj file.
      
    • I haven't had time to try this yet (I don't have access to a machine with VS installed right now), are you saying that for Web projects in order to Preview the project file gets modified? That shouldn't be the case, if it is could you open an issue at https://github.com/sayedihashimi/slow-cheetah/issues so that we can track this?
  • Windows Azure
    7 Posts | Last Post May 29, 2012
    • Hey there! Got it installed and tested. The builds transform OK. However...
      
      'Package...' to Windows Azure does not. I have two transforms on my app.config in my Windows Azure Worker role: 'Release' and 'ReleaseTest'. When I compile the two output folders contain each a separate version of my app.config (renamed to match my project naturally).
      
      However when I select 'Package...' on my Windows Azure deployment project and get my packaged deployment the transform does not happen. I open up the packages and extract out my .config files and compare. In both cases they get the values from the app.config and the transformations have not been done.
      
      Do you think this would be hard to fix? The scenario is I want to transform my app.config for the worker role to deploy different cache configurations on different deployments.
    • Hi Magnus, unfortunately we were not able to get support for Azure projects in this release. I am not sure what this would take, I need to investigate it a bit more.
    • Azure support would be fantastic. Let me know if you need somebody to try out ideas. And I'll buy lunch.
    • This seems to work: http://wely-lau.net/2012/03/14/applying-config-transformation-app-config
      
      In short, edit the csproj file for your worker role project and "Scroll down to the end of the file and add the following snippet before the closing tag of project:
      
        <Import Project="$(CloudExtensionsDir)Microsoft.WindowsAzure.targets" />
        <Target Name="CopyWorkerRoleConfigurations" BeforeTargets="AfterPackageComputeService">
          <Copy SourceFiles="..WorkerRole1bin$(Configuration)WorkerRole1.dll.config"
                DestinationFolder="$(IntermediateOutputPath)WorkerRole1" OverwriteReadOnlyFiles="true" />
        </Target>
      </Project>"
    • Thanks Jeff for the pointer. This seems to be covering app.config for Azure worker roles. It seems like we should also support transforming other files as well. I am going to go ahead and add this support.
      
      Jeff could you email me at sayedha [at] (microsoftDOTcom) so that I can send you the package once I have it for testing?
    • Sayed, sorry for the long delay. Am I missing the setting on here to enable email notifications for replies? Anyway, email sent. Hopefully I'm not too late.
    • Hi Jeff, I have worked on this and may have something working. Can you checkout the discussion at https://github.com/sayedihashimi/slow-cheetah/issues/5#issuecomment-5972109 for more info and a link to download the bits? If you try it out please let me know what you find.
  • Support for Configs Other Than Debug or Release?
    2 Posts | Last Post May 23, 2012
    • Sorry if this has been asked before.  Thanks for the great add-in!
    • Sorry, please disregard that question.  I see that adding a configuration in the Configuration Manager takes care of that.
  • VS2010 Post Build event doesn't include transforms?
    2 Posts | Last Post May 17, 2012
    • Perhaps I am missing something...when I Build my project in VS2010 I also copy the output to another location.  However, the transforms have not taken place at this stage?
      
      If check my bin/release folder, the transforms are there, but the VS Post Build Event has already copied my files?
      
      Any advice?
    • Two things you should try:
      1. Make sure the source file is not marked as Copy to output directory
      2. Instead of a post build event create a target in your project file and set the attributes DependsOnTargets="TransformAllFiles" AfterTargets="Build"
  • SlowCheetah transformations as linked files
    7 Posts | Last Post May 09, 2012
    • We have a number of config files that require transformations across different projects in the same solution.
      
      I've had the idea of creating a config project within the solution that contains the shared config files with their transformations then I would be able to add these config files as linked files into my other projects.
      
      For example the ConnectionStrings node in web/app.config's can use a configSource property which points at the linked file leaving the transformations to be performed by the config project.
      
      Has anyone don the same / can see any potential problems? I also intend to follow Sayed's blog article of integrating SlowCheetah into our solution with solution items so our build server can perfrom the transformations.
    • I haven't tried that scenario myself, but the latest published version does have support for transforming linked files. Let me know if you have any issues with the implementation. 
    • Hi. I'm trying to use the same set up that Mike as described to allow a single config file to be shared with several projects, but I cannot get the linked file transformation working. The parent file is always transformed but the linked file isn't. Is there any extra configuration required to transform linked files?
    • Same here. My app.config transforms fine but the linked file is not transforming.
      Preview Transform in the UI shows the transform however it doesn't modify the file in bin\debug after a build.
      
      Running latest build of Slow Cheetah.
    • @Phil/CodeJocky, there may be a bug here, I thought this was working. Can one of you guys send me a sample solution so that I could take a look at this? My email is sayedha [at]{MicrosoftDOTcom}.
    • Oops. Apologies Sayed. I think this is PEBCAK.
      I just realised that being a linked file it defaulted to a None build action.
      Setting the config file properties to Content/Copy Always has fixed it.
    • UPDATE: Setting the config file properties to Content/*Copy if newer* has fixed it.
      Make sure you don't use *Copy Always* otherwise the transform gets overwritten with the original.
  • Transforms Run Too Late
    4 Posts | Last Post May 07, 2012
    • I'm probably doing something wrong, but I have an AfterBuild target in my project that copies output files to another directory:
      
        <Target Name="AfterBuild">
          <ItemGroup>
            <FilesToCopy Include="$(OutputPath)**\*.*" />
          </ItemGroup>
          <Copy SourceFiles="@(FilesToCopy)" DestinationFolder="..\..\FitNesse\dll_repository\%(RecursiveDir)" />
        </Target>
      
      However, it would appear that SlowCheetah is actually running the transforms *after* that operation. The result is I get copies of the pre-transformed configs :(
      
      Is there something else I should be doing?
    • If you are depending on the transforms to run you should add DependsOnTargets="TransformAllFiles" to that target.
    • Sweet! This worked beautifully.
      
      I really like MSBuild... I just wish little nuggets of info like this were easier to come by.
    • @jw_carroll You should get a copy of my MSBuild book http://www.amazon.com/gp/product/0735645248?ie=UTF8&tag=sedodream-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0735645248.
  • Manual transform execution
    1 Posts | Last Post April 30, 2012
    • I would like to leverage the technology here to facilitate transformations when installing NuGet Packages.  I think the way to do it will be to have a special "exe" that you include in your NuGet Package that is executed by PowerShell once the NuGet is installed. It can be passed various parameters to identify the files to be merged/transformed but missing is the technology to execute the transform outside a build environment.
      
      Any chance you can help there?
81 - 90 of 164 Items