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 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.
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
Excellent work -- so far only one major problem with web applications (solved here: http://stackoverflow.com/questions/16225304/using-slowcheetah-config-transforms-on-web-config-in-a-3-5-web-forms-app)
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 ?
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.
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.
I stumbled upon SlowCheetah last week. Very cool extension. I see it has been recently upgraded to be NuGet dependent. This causes a couple problems for my group:
1. We have made the decisions that developers should not use NuGet.
2. Our TFS build server is not Internet facing, so downloading from NuGet as part of the build is not possible.
If I could find a link to the older version of SlowCheetah, we could use that. Even that though is not ideal, as we would be stuck on an old version, not being able to take advantage of new features.
Any other groups in the same situation as myself and any thoughts from the developer on this? Thanks.
Thanks for the comments. Are your concerns that it uses NuGet or that it connects to the internet? If it is related to connecting to the internet take this into consideration.
When SlowCheetah is installed if you have a custom local repo defined in VS it will pull packages from that location instead of from nuget.org. You could also put a feature request in at http://slowcheetah.uservoice.com/ for SlowCheetah to drop the NuGet package on install and then reference it from that location instead of going to nuget.org. This should be pretty straight forward and I should be able to implement it.
If the concern is simply the fact that it uses NuGet, then take the following points into consideration.
1. NuGet is used by many projects types by default in VS 2012.
2. Microsoft will be investing more in NuGet (i.e. its not going away anytime soon, and it will be used more and more)
3. Benefits to using the NuGet package:
3.1 When SlowCheethah is installed by one developer, all devs will get the transform behavior even if they didn't install the package.
3.2 When SlowCheetah is executed from an automated build package restore facilitates transforming the XML files.
With those points the benefits out weigh the negatives.
If you'd like to use a version which has the previous behavior the best thing to do is to fork the repo at https://github.com/sayedihashimi/slow-cheetah and build whatever version you desire. I won't be supporting that though, you'd be on your own.
I hope you consider these points.
Sayed Ibrahim Hashimi
We plan to use SlowCheetah to transform config files in the studio and on build server TeamCity.
Transformation: Web.config + Web.$(Configuration).config + Web.$(PublishProfile).config
We would like to use this scheme to other configuration files, such as App.config and NLog.config and etc.
Its at the project level because NuGet package restore is a project level concept. With that said if you have multiple projects in a solution which each have SlowCheetah you only need to invoke the packageRestore.proj for one project. All the files for the solution go into the same folder. So there is no benefit of calling packageRestore.proj multiple times for the same solution.
I'm working on visual studio 2008 environment. I read the compatibility with only 2010 or 2012.
Is there an older versions which supports 2008 visual studio?
Can you post the link?
I'm trying to use this to my BIDS 2008 app to configure test and dev environment.
SlowCheetah does not have any support for DB projects. I'm not sure what support you were envisioning there. We are prioritizing features at http://slowcheetah.uservoice.com/. The best thing to do here is to create an item with the behavior you are looking for. After that we can prioritize that work against the other requests.
I was wondering if anyone has managed to get this working with MSTest and deploying item.
I have a BBCSearch.config file that has transforms for the different Environments. This file get transformed and outputted to the correct directory when build.
I can not find away to deploy the TRANSFORMED file to the test directory
When i add it as a deployment items as <projectpath>\BBCSearch.config, the original file is copied not the TRANSFORMED file.
We have a solution with 8 different build configurations. When I right-click on an app.config file in one of the projects and choose "Add Transform", only app.Debug.config and app.Release.config transform files are created. In other solutions, SlowCheetah works as expected. Anyone have any idea what's going on? Here's a list of the build configurations we have:
Debug (with DB Deploy)
Could the problem be based on one of the build configuration names? Thanks in advance. Using VS 2010 with SlowCheetah 2.5.1.
The issues is likely how you have created your build configurations. In VS when you create a build configuration it asks if you want to create a Project Configuration as well. You should check that checkbox. With SlowCheetah the transforms are based on Project Configurations, not solution config.
Just solved this, which is somewhat embarrassing, but the issue is that the individual project doesn't have all the configurations that the solution does. Manually adding the new configurations should fix the issue.
I just installed version 2.5.2. I'm trying to publish a WPF application for ClickOnce. I just started up a blank WPF project, added a transform to the App.config, and published. When I install the application, the config file isn't there. Can anybody else confirm? I'm using Visual Studio 2012 Ultimate.
What I do see is that an App.config.deploy file gets created in the publish\Application Files\WpfApplication1_1_0_0_0\obj\Debug\SlowCheetah directory when I publish. When the application is installed, an App.config file gets created using that same folder structure, but there's no WindowsApplication1.exe.config file created where the application needs it.
I have a collection of nodes, in a particular node i want to find a node and replace its values. This is custom section
How would i replace the Value in Type="t1" , subType ="t1s2" ?
Also how can i write a sysntax, that if node is present replace it otyherwise insert it?
I have a Worker Role project with an app.config. I have 6 different configurations with transforms in them.
When packaging an Azure app for deployment (right-click the "Cloud" project and select "Package"), the worker role's configuration files do not get transformed, or at least packaged up properly.
Is there a way to make this happen?
Thanks for sharing the link. If there are any further comments regarding this feature its best to keep those on the issue page <a href="https://github.com/sayedihashimi/slow-cheetah/issues/5">https://github.com/sayedihashimi/slow-cheetah/issues/5#issuecomment-11874800</a>
I am having the same issue. Your comments look hopeful. However, I can't seem to get to the link provided by by gautambjain. Is the link correct? Does it reference a version other than what is currently on the web site? Do I need any permissions to get into https://github.com/sayedihashimi ?
Please advise. Thanks.
I have an update. I did find the 2.5.1 release in the drop box. I uninstalled the prior release, and installed 2.5.1 on an existing project. Unfortunately, it doesn't seem to do the transform when I create a new package for an existing worker role. I am trying to transform app.config (which transforms as desired/expected when I go into debug). Is there anything else I need to do after the install besides re-generate the Azure worker role package?
Note I am using the November 2011 Azure SDK. Are the transforms dependent on the June 2012 Azure SDK release?
The XML-translation works very well in Visual Studio for my web project, but when I build a deployment package, I get a web.config with one error : only one XML-transformation doesn't done. I have $(ReplacableToken_xxx)" instead of :
connectionString="$(ReplacableToken_MyConnectionString-Web.config Connection String_0)"
Here is my xml-transformation :
<add connectionString="Data Source=MyDB\BE,1433; Initial Catalog=MyDB;Integrated Security=SSPI" xdt:Transform="SetAttributes(connectionString)" xdt:Locator="Condition(@name='MyConnectionString')"/>
Thank you for your help.
Thanks for the feedback this is not related to SlowCheetah. This is a part of the Web Project publish/package support. I've blogged more details of this at http://sedodream.com/2010/11/11/ASPNETWebApplicationPublishPackageTokenizingParameters.aspx.
When I build a package on my local machine it transforms just fine, all transforms are good. But when I submit the job to the build server it doesn't work. I get multiple versions of the configs and they are not transformed. I've followed the instructions and included the dll and targets file in TFS, and even embeded it in my web project. I've pointed the project file to where the target file is: <SlowCheetahTargets Condition=" '$(SlowCheetahTargets)'=='' ">$(MSBuildProjectDirectory)\App_Data\SlowCheetah.Transforms.targets</SlowCheetahTargets>
But I still seem to be using the transform file in my %appdata% directory - when I rename it I can't even preview the transform. Shouldn't it use the one defined in the project file and in TFS instead? If I am still using the .target in appdata then the build server is too...
Using TFS 2010, VS 2010, my build is building configurations "Any CPU|Ext.Prod", same as my workstation. I have nothing in my Build events.
The only info I have regarding this is my blog post at <a href="http://sedodream.com/2011/12/12/SlowCheetahXMLTransformsFromACIServer.aspx">http://sedodream.com/2011/12/12/SlowCheetahXMLTransformsFromACIServer.aspx</a>. If you are still having issues try stackoverflow.com to see if a community member can help out.
I have the same issue. I've already set up my project exactly as laid out in the post by Sayed, but the build server still does not transform my config files. Using the local publishing from Visual Studio works fine, though.
If you take a look at the build log you should see if the .targets file is getting imported or not. I am guessing that the file is not being imported. Could you take a look and let me know if you are able to determine that?
You are right. The .targets file is not even being referenced. My path to the targets file was not correct. Anyway, once I've got that fixed, I found one more issue. When I access the source files in my TFS Build server (_PublishedWebsites\ProjectName), the config files are NOT transformed. However, they are transformed within the packages (_PublishedWebsites\ProjectName_Package). Is there any way to correct this?
So, apparently my transforms may have been working the whole time on the build server. I was looking at the configs in the _PublishedWebsites build directory, seeing that they were not transformed. It didn't occur to me that the zipped package might contain different configuration values than the unzipped directory! (Thanks deweaver!)
Also, my server build log does not contain references to ".targets" or "SlowCheetah" anywhere.
Everyone needs to check the config files deep inside of the zipped Project_Package file to tell if the transform worked on the build server.
I will now re-assess our use of this tool (I had given up on it). Certainly fixing it to do the transforms in both build directories would make it much more useful.