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
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".
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.
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.
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).
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.
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.
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.
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?
I tried to build an asp.net project including slowsheetah 184.108.40.206 version and i got the following build error:
error MSB3191: Unable to create directory "C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\MSBuild\SlowCheetah\v220.127.116.11\"
Although the slowcheeta files are not located there.
When i replaced the line in the slowcheeta.transforms.targets file:
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.
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?
PD: I'm using visual studio 2013 (update 1)
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.
A TargetFramework profile exclusion list will be generated.
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files.
ConsoleApplication1 -> d:\rzetelny\Visual Studio 2010\Projects\ConsoleApplication1\bin\Debug\ConsoleApplication1.exe
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
Is there a way to make them work together ?
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?
I was trying to add config files that were not debug or release for my other environments. I didn't see any way through VS to do this, so I decided to edit the project files. I added a PropertyGroup setting as well as an ItemGroup setting in my project file. The new config did show up under the app.config, however the actual build for my selected config did not transform the configuration or put the built files into the same named folder under bin. Suggestions? Is there a limitation to only debug and release builds? Thanks
I have build the transform replacement using the plungin on a Class Library project and it works amazingly on my box. I checked everything into SVN and everyone who got the project from SVN are unable to get the replacements to work. I have the following setup..
App.Debug.QA2.config We checked a few things.. everyone has the plung-in installed, we are all on VS2013 Pro, our project files (XMLs) are good, we are all selecting the correct environment (QA1/QA2) build configuration when we build but for everyone else the <dllname>.config file is not getting replaced. any inputs?
Via Nuget, I've installed SlowCheetah 18.104.22.168 and SlowCheetah.Tasks.Unofficial 1.0.0, and am unable to add a transform to any of my solution's projects' app.config files. When I right-click on an app.config file, I do not see "Add transform" in the context-sensitive menu that appears.
I have tried uninstalling and reinstalling SlowCheetah and SlowCheetah.Tasks.Unofficial, as well as reloading project, and restarting Visual Studio. None of these have helped.