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.
Love the product, and have been using it for a while with great success. After an update today though my Azure Worker Role project no longer builds with the following error:
Error 21 The "SlowCheetah.Xdt.TransformXml" task could not be loaded from the assembly C:\Users\idrennan\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10\SlowCheetah.Xdt.dll. Could not load file or assembly 'file:///C:\Users\idrennan\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. InternalServices
Could you provide any guidance as to the cause? Also, below is the relevant line(s) in my .proj file that seem to now be causing the issue:
<SlowCheetahTargets Condition=" '$(SlowCheetahTargets)'=='' ">$(LOCALAPPDATA)\Microsoft\MSBuild\SlowCheetah\v1\SlowCheetah.Transforms.targets</SlowCheetahTargets>
<Import Project="$(SlowCheetahTargets)" Condition="Exists('$(SlowCheetahTargets)')" />
This is the error that my colleague was experiencing. I bet if you look in that directory (C:\Users\idrennan\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10) you'll find a copy of the project files you were building at the time the build failed.
It seems that necessary files are placed at %APPDATA%\..\Local\Microsoft\MSBuild\SlowCheetah\v1. Copy files from the folder to %APPDATA%\..\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10.
List of files:
This solved the problem you stated for me. However, I continue to get following error, for which I have not found any solution:
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.
Hey, if you are running Ncrunch then it's causing the build error.
Install version 126.96.36.199 (important to get that version cause verison 188.8.131.52 and 184.108.40.206 doesn't work) of slowcheetah and include the package in Ncrunch and it will work again. :)
So following Zendu's suggestion worked (this is a clan install computer btw).
I copied the files from the v1 folder to the v2.5.10, restarted VS, and then it seemed to work.
Sayed-Ibrahim-Hashimi - hopefully this gives you enough info to troubleshoot/fix the issue.
Can SlowCheetah transform app.config for WCF projects when published using the file publish method.
I currently have Version 2.5.10 installed and it does not appear to be transforming an publish for my WCF project.
We have multiple target environments (DEV/QA, etc.). Since the only things that change are configuration settings (nothing done with precompilation statements) we'd rather not have to have a configuration per environment; seems like a waste to recompile for each environment since the code is the same. We'd also like to minimize the customization of the SlowCheetah.Transforms.targets file. Is there a recommended way to compile the code once and get SlowCheetah to create transformed config files for multiple environments?
Thanks in advance
No, I haven't. I was hoping to get a reply from Sayed but never did. I know I could do it by customizing the targets file to use a custom variable like $(Environment) instead of $(Configuration) but I was hoping to not customize anything so that I wouldn't have to revisit the targets file to check for possible conflicts.
Overall, I do like SlowCheetah I just really dislike how it and XML Transforms overall are married to build configurations. The binaries for us are not different per environment. The only thing that is different is just the configs. We currently use XML Preprocess and so far, I'm thinking we're going to stick to it.
This is exactly the problem I'm experiencing. I'm trying to overcome the problem by only referencing the SlowCheetah target, but that doesn't work:
MSBuild [path to project file] /t:TransformAllFiles /p:Configuration=Release
I found a pretty decent work around for this, while still using SlowCheetah.
I created some afterbuild events:
<TransformXml Source="web.config" Transform="Web.Staging.config" Destination="webstaging.config" />
<TransformXml Source="web.config" Transform="Web.Release.config" Destination="Webrelease.config" />
With the devops tool we are using (Buildmaster) The files are renamed and replaced on the correct environments.
It's not ideal, but you still have central config files (web.config and umbracoSettings.config), and you only have to manage the changes in the XMLtransform files.
I deploy my cloud services solution with Visual Studio 2013 (Azure SDK 2.2 + SlowCheetah). I created new build configuration 'config_name' besides standard Debug and Release and I use it in my publish profile. But when I start deployment I see SlowCheetah (I guess) uses Release config:
Transformed Web.config using C:\...\Web.Release.config into obj\Release\TransformWebConfig\transformed\Web.config.
ok, this is really important - I have staging deployment and production version of my cloud app. When I deploy staging it's important to have a connection string point to STAGING db and have all other things configured differently (Twilio, sendgrid, etc). Now I can't have it bacause my Debug config is for local development, Release is for Production, and the one that doesn't work is for Staging. So I basically have a hard time deploying and testing my solution.
ok, solved this myself. I opened configuration manager and under build everything were selected as Release. Changed this to 'config_name' and it worked (well, i had to do this in csproj and sln files manually, but that's another story).
I'm using VS 2012 and Azure Tools 2.1 with SlowCheetah. I downloaded & installed the VS extension and everything seemed to go fine: I was able to create Debug and Release versions of the app.config for my worker role. I added transforms and checked them with "Preview Transform". All good. But when I build -- nothing. Transforms haven't been done. Am I missing something? Is there somewhere I can look to see if the transform failed or get some logging data on what's happening?
I'm looking for a way to use msbuild together with slowcheetah to produce/publish *only* the transformed files.
MSBuild [path to project file] /t:TransformAllFiles /p:Configurat
That doesn't give any errors, but it doesn;t give me my files either.
I think because SlowCheetah only transforms on publish.
I tried some other options as well, but to no avail.
I'm receiving the error:
Could not copy the file "bin\Debug\TIPS.Client.exe.config" because it was not found.
I'm not alone
If I simply create a new WPF application and enable "Enable ClickOnce security settings" I get the error.
I've created an app that illustrates the problem
VS 2012 update 3
installed VS slowcheetah expansion
create wpf 4.5
enable ClickOnce security
I'm having the same Problem with Version 220.127.116.11, VS2013 Update 3 in an WPF-Application. Added the transform, did some transformations, preview is working fine, but building the release gives me the error described here. Click Once Security is enabled.
Ok sorry, If I choose Tools/Extensions and Updates it tells me I have 18.104.22.168 installed. As building is not working I uninstalled the package from my project and recognized I had 2.5.7 there. So I uninstalled it (which didn't work right away) and installed it (why 2.5.8?) again. Now its building!
Sorry switching to .NET 4.0 caused the extension to not work in VS2010. I've just released 22.214.171.124 which is built with .NET 4.0 and should work with VS2010. Please try it out and let me know if it does not work.
i am using VS 2012 with update 3. After installing the latest from Nuget i was fully expect to see the context menu "Add Transform" when right click on a app.config file. but no such menu comes up. how do i get it to work? any documentation/user guild on this?
Sayed, my two apps have too many dependencies and hooks into the larger solution to offer as a repro case. So I went and created a new WinForms app and cannot cause the problem, even with exactly the same config files and transforms. I'm not sure what to make of this. Clearly something is wrong in the two projects I have. If it helps any I am willing to offer you the project file itself, though it won't build of course due to the lack of dependencies.
Sorry for the confusion guys. The NuGet package is just a mechanism to ship the underlying build support. The Visual Studio extension (which this is the download page for) ships the menu options in Visual Studio.
It is authored this way so that when working in teams if one person adds SlowCheetah everyone will get the correct build behavior without having to install the extension. Only those interested in creating new transforms need to install the extension.
Unless you are an advanced user you can view the NuGet package as an implementation detail.
I hope that clears things up.
I am using VS2012.3 and installed the VS extension to a web site project in hopes of transforming a CMS specific file AssetManagement.config, but I do not see the context menu offering the "Add Transform" option. I tried to install the Nuget package but installation failed with the message "Project file not found". Does this work only with WAPs?
I am using VS2010, I've installed the vsix using Tools > Extension Manager. I've created a new Console Application with App.config file, I don't see an "Add Transform" option. Doing the same with VS2012, I do get the "Add Transform" option - is there a version available for VS2010?
Sorry guys switching to .NET 4.0 caused the extension to not work in VS2010. I've just released 126.96.36.199 which is built with .NET 4.0 and should work with VS2010. Please try it out and let me know if it does not work.
Haven't tested it much yet but:
1) Download 7-Zip
2) Download the VSIX from the link above
3) Right click on the VSIX and select Open with -> Choose default program
4) Select C:\Program Files\7-Zip\7zFM.exe (or Program Files (x86) for 32 bit)
*** Make sure to uncheck the box to associate 7zFM.exe with VSIX files ***
5) Right click on extension.vsixmanifest and select Edit (F4)
6) Copy/paste the <VisualStudio Version="11.0"> node and replace 11.0 with 12.0
7) Save and close Notepad - 7-Zip will ask you to save the file back in the archive
8) Hope it works ;)
I was able to do transforms but haven't tried to build or deploy anything yet using VS2013
Worked like a charm. Thank you very much!
I did deploy with no problems.
I used the excellent Total commander to open the vsix file, select any file in right pane and use Ctrl-left arrow to open it in the right pane. Brilliant :)