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
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.
Release 188.8.131.52 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!
Sorry I had some issues with 184.108.40.206. 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.
Hi, we would like to integrate Slow Cheetah with our automatic build script, but it seems that it has dependency with Visual Studio. Ideally we would like our build server environment to be Visual Studio-less, and we wonder if there is a way to integrate Slow Cheetah in our build script with just standard .NET Framework SDK. Thanks.
I love the ability to preview! Preview works great for me, in both silverlight and everywhere else. But when Building or Publishing in Visual Studio 2010, the .Web project contains the silverlight \ClientBin\MySlProj.xap (zip file) copied from the silverlight project with all the silverlight files, one being the ServiceReferences.ClientConfig. This file is NOT transformed. I am not sure if this is a VS or SlowCheetah problem. Can someone please help?
A bit more info: in silverlight, when I build ...\MySilverlightProject\Bin\Release\ServiceReferences.ClientConfig IS TRANSFORMED, but nothing else is. The main file isn't (which would be expected), but I thought the .xap would contain the transfomed file. Also, with the 8/16/2012 bug fix "Fix for XML files not transformed on file system publish" I figured that the .xap file would contain the transfomed .ClientConfig, but it doesn't.
Sorry for the late reply here I haven't had much time to work on this project recently.
I don't have any experience with silverlight so it may not be easy for me to get this done. I've added an issue on the project page to track this at https://github.com/sayedihashimi/slow-cheetah/issues/40.
If you have experience with MSBuild and you would like to contribute to the project let me know and I'll help you get started.
I get an anoying warning when using Slow Cheetah on VS2012:
SlowCheetah.Transforms.targets (170): The target "CopyAllFilesToSingleFolderForPackage" does not exist in the project.
I've made a local fix by adding an empty CopyAllFilesToSingleFolderForPackage target. Would it be an idea to make a general fix?
I am also getting the CopyAllFilesToSingleFolderForPackage warning, though my config file didn't even get transformed initially after updating. I had to uninstall and reinstall the utility. I still get the warning but at least the config gets transformed now.
The fix I applied is the following. Just add the following right above the <Target Name="TransformAllFiles"> tag:
Hopefully this should get you going.
Sorry for the late reply here. I've added an issue to track this at https://github.com/sayedihashimi/slow-cheetah/issues/37.
The recommended workaround is below:
1. Open the folder C:\Users\Ibrahim\AppData\Local\Microsoft\MSBuild\SlowCheetah\v1
2. Make a backup copy of SlowCheetah.transforms.targets in case anything goes wrong
3. On line 170 remove the attribute AfterTargets="CopyAllFilesToSingleFolderForPackage" from the CopyTransformFilesWep target.
When I fix this bug in the next release this file will automatically be updated and you won't notice the difference.
I currently have a scenario where I have a web application and a project that controls my data access layer that has an app.config that gets copied to any project that uses it. My problem is that the copy to other projects (which depend on the data access layer) appears to happen before the transformation. I've verified that the transformation is happening (cool!) and that it's landing in the bin/Release folder, but the pre-transform copy seems to be the one that's being passed around to projects that depend on it. Does anyone have an idea why this is happening and how to solve it?
Orchard uses ASP.NET MVC Areas for its modules. I need to use module-specific web.config files, and was hoping to use SlowCheetah to provide these. But SlowCheetah doesn't seem to run transforms during the build. Any thoughts on how best to get that to happen?
Hi I've opened an issue for this at https://github.com/sayedihashimi/slow-cheetah/issues/39.
So just to be clear regarding what you are looking for.
In your web project you have foo.config, you right-click to create the transforms. You edit the transforms. During build you want the original foo.config to be transformed using foo.BUILDCONFIG.config. This will cause the original file to be overwritten.
Do you think that will be an issue? We'd have to be careful not to break anything here. Have to handle the error cases well.
Sorry if this has been posted before, but I can't find it anywhere. This is a great extension, but when working with multiple users on web projects, you cannot simply just transform the "web.config" file since it gets checked out every single time you press F5. The way we get around this is to create a "web.base.config" or "web.master.config" and then "tweak" the VS Project file so that all the other transform configs (Debug, Release) "DependOn" the "web.base.config" instead of the web.config. This allows us to setup TFS to "ignore" the web.config so it NEVER gets checked in/out during builds and is ONLY used for debugging or deploying and is rebuilt everytime.
We've done this by using the following "*.wpp.targets" file:
<!-- Make sure web.config will be there even for package/publish -->
<Target Name="CopyWebConfig" BeforeTargets="Build;Rebuild">
<Target Name="CustomTarget" BeforeTargets="BeforeBuild">
<Message Text="Transforming: Web.$(Configuration).config" Importance="high" />
<TransformXml Source="Web.base.config" Transform="Web.$(Configuration).config" Destination="Web.config" />
Easy and simple, however, it doesn't work with app.config. Anyway, does Slow Cheetah support this? Does it support specifying a different file besides "app.config" or "web.config" as the transform target??
Hi tymberwyld, for app.config this is not an issue. When you build your desktop project all the assemblies are written to the bin folder and your application is launched from there. During the build process the app.config file from your source location is copied to the bin folder. It is during this process that SlowCheetah is called and instead of copying the original source file, that file is transformed and placed into the bin folder. Because of this the original app.config is never modified.
That is why web.config is an issue. The file is used as is.
I don't think there is such a list. Its pretty simple though the command should appear for any project which has one of the extensions below
Other project types will require extra MSBuild to invoke the transform at the correct time. If you would like some specific support you can open an issue at https://github.com/sayedihashimi/slow-cheetah/issues/new. If you are familiar with MSBuild and want to take an initial crack at it just send me a pull request.
Thanks for your great work :)
Could you please have a look at this?
As posted on GitHub (https://github.com/sayedihashimi/slow-cheetah/issues/16#issuecomment-7804566)
I have a similar problem when publishing a WCF project to file system.
When I preview the transforms they are all fine. However when I publish, the base app.config is transformed to web.config. Building makes no difference.
I've tried your hotfix, same problem.
I run VS2010 SP1 Ultimate on Windows 7 Professional.
It's a shame that web project aren't supported. Could you add some way to support also web project? I know that the problem is that you can't overwrite the web.config file but it would be great if you could add a copy function after the transformation.
More over it would be nice to have a transformation based on the solution configuration and not on the project configuration. This means the solution have additional configurations but the project have the standard configuration (debug/release).
For this reason it would be nice to have the config file in the solution, transform it on build and copy it to the specified project/folders. Theoretically you could have more than one config file in the solution and on build transform them all and copy them in different projects/folders. Which theoretically could be again transformed during the project build process.
Build Solution --> transform solution items --> copy solution items --> build projects.
Thanks Casual, I will look into this again to see what can be done here. I'm afraid it may cause more problems than it solves. But in any case many people want this so I've created an issue to track this this at https://github.com/sayedihashimi/slow-cheetah/issues/39.