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.
I am having problems getting the endpoint on my app.config to do a transform that changes the address ( really the whole tag) in my windows service using the latest SlowCheetah 2.4.1 and using Visual Studio 2010. This is for a Windows Service .NET 4.0.
Do to size restrictions, I am removing the endpoint binding info I use the following code for the regular app.config:
<endpoint address="http://developmentServer/WebServices/MasterEngine/MasterEngineService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMasterEngineService" contract="OverlayFarEnd.IMasterEngineService" name="BasicHttpBinding_IMasterEngineService"/>
And the app.Release.config is as follows:
<endpoint address="http://productionServer/WebServices/MasterEngine/MasterEngineService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMasterEngineService" contract="OverlayFarEnd.IMasterEngineService" name="BasicHttpBinding_IMasterEngineService" xdt:Transform="Replace" xdt:Locator="Match(name)">
I have tried adding the client tag outside the endpoint, removing it etc...
The weird thing is that the connectionString does the transform, but the endpoint does not. Any ideas? I'm going off matching the name and i've copy and pasted it to each place to make sure it is correct.
Thanks in advance :(
I'm having the same problem.
I have 3 config files. app.Debug.config, app.Staging.config and app.Release.config.
Each of these files must point to a different service endpoint but it doesn't seem to be working.
Here's my original app.config:
<?xml version="1.0" encoding="utf-8"?>
<binding name="BasicHttpBinding_IInHouseService" />
contract="InHouse_LOCAL.IInHouseService" name="BasicHttpBinding_IInHouseService" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0.3" />
<assemblyIdentity name="PresentationFramework" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-220.127.116.11" newVersion="18.104.22.168" />
<assemblyIdentity name="Lucene.Net" publicKeyToken="85089178b9ac3181" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-22.214.171.124" newVersion="126.96.36.199" />
Here's my app.Staging.config:
contract="InHouse_LOCAL.IInHouseService" name="BasicHttpBinding_IInHouseService" xdt:transform="replace"
Nice tool. It simplifies the process of kicking off automation runs in different environments, without the need to edit the app.config file. I have just a couple of issues with it:
- I can't debug different environments without editing the debug app.config. I wouldn't otherwise even need an app.debug.config file.
- When switching configuration and rebuilding, I get an error message that a test with the same id as (insert random test case) has already been loaded in the test editor.
- When debugging a web performance test, if I open the test case to watch the results while the test is executing, Visual Studio crashes. Since I can't debug a data driven web performance test case without opening to watch it execute, this is a major problem. I never had this problem before installing slowcheetah, so it is my prime suspect.
I have two xml files. 1. The source file. 2. The file that should be after applying the transformation. Is it possible to generate the SlowCheetah transformation xml by comparing these two files?
I am having problems determining how to fix this issue. Hoping someone with more insight into this can help...
I have a console app with an app.config transform for Debug / Release. In the csproj file, I have a PostBuildEvent command that executes a batch file. This batch file is supposed to copy the output of the build and the transformed .config file to another directory.
Looking at the build logs, the PostBuildEvent is executing *before* SlowCheetah transforms the config files. As a result, the (untransformed) app.config is getting copied--not the transformed version.
I have also tried moving the execution of the batch file into the AfterBuild task with the same results.
How can I force SlowChetah to execute before the batch file is executed?
A post build event is an event that is executed after the project is built. It does not specify whether it occurs before/after any other targets. In your case if you need to execute a target before/after transforms I would create a Target and then use the TransformAllFiles in the BeforeTargets attribute or the AfterTargets attribute of the target which you are creating. You can also place it in the DependsOnTargets value as well depending on your needs.
I tried using this with my Nlog.config added in worker role. Giving me strange error.
Error 163 The item "bin\Debug\NLog.config" in item list "OutputGroups" does not define a value for metadata "TargetPath". In order to use this metadata, either qualify it by specifying %(OutputGroups.TargetPath), or ensure that all items in this list define a value for this metadata. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Windows Azure Tools\1.6\Microsoft.WindowsAzure.targets 2299 5 Insight.CloudWeb
My SO Question:- http://stackoverflow.com/questions/11790895/azure-worker-role-configuration-issue-while-using-slowcheetah-with-custom-config
I am building an application that uses the Salesforce API. I developed using the enterprise.wsdl from our sandbox Salesforce. I added the web reference by pointing to the file. It specifys the sandbox url. In my production config/build I would like it to point to live url. Can I use Slow CHeetah for this transformation and when publishing our Prod build will it work correctly?
I have a solution with several VS setup projects in it. About 75% of them work without issue, but some of them give me the following build error (attributed to my setup project file):
Could not find file 'bin\x86\Debug\connections.config' 'The system cannot find the file specified.'
Upon inspection of the target folder afterwards, it's clear that the transform was indeed run and the file was created. Leads me to believe that the setup project is looking for this file before SlowCheetah's had the opportunity to perform the transform.
However, this only happens to SOME of my setup projects in the solution. The others, which also have exactly similar transforms build without issue. (and after running their installs, I've found that the transforms were run successfully too).
Me no understand.
* I'm running VS2010 on XP sp3
* The projects in my solution are .Net 4.0 windows services and class libs (upgraded from VS 2008 / .Net 2.0)
* The setup projects are Visual Studio 2010 setup projects (new) targeting .Net 4.0 full profile and x86
* I've also gotten the same results from building this solution on a box with WinServer 2008 R2 Enterprise
I was able to eliminate this issue with one of the projects by obliterating the transforms and the SlowCheetah nodes from the project file, and then rebuilding the setup project from scratch. Unfortunately this did NOT work for the other failing setup projects. I have no idea why this worked for just the one project.
Has anyone experienced this? What's really causing this? I've killed a LOT of time trying to figure this one out...
I have had the same issue but recreating the setup projects resolved it. But I also have another setup project that works when building in Release mode, but not in other configurations, despite the file being transformed and output to the bin folder.
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.