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 126.96.36.199 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 188.8.131.52. 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 just downloaded the project from github and I'm trying to get it to compile. I've installed Visual Studio SDK and the NuGet packages but I get an error on the reference Microsoft.VisualStudio.ComponentModelHost (version 10.0.0.0). I guess it's because I use VS2012 (and thus VS2012 SDK, version 184.108.40.206). Are you still using VS2010? Is there a way around it so I can still use VS2012 or do I need to go back to VS2010?
I've been using SlowCheetah for quite some time so I suppose I should help out with the development ;)
Finally got it to work. Had to do the following:
Install VS2010 SDK
Install VS2010 SP1
Install VS2010 SDK SP1
Install VS2012 Update 4
Install VS2012 SDK
Open the solution and download the missing Nuget packages.
And you're all set!
Really like SlowCheetah, but there is one scenario which I couldn't get working out of the box.
I have a web.config with the following transforms/configurations:
When I publish for Dev, only the Dev transform gets applied and put into the web.config.
This is the standard behavior.
What I actually want to do is build/publish once and deploy on any of the machines.
After publish I want the resulting web.configs to look like this:
Web.Dev.Config (transformed web.config for Dev)
Web.Test.Config (transformed web.config for Test)
Web.Acc.Config (transformed web.config for Acc)
Web.Prd.Config (transformed web.config for Prd)
Is this possible out of the box? Or do I need to change my build scripts manually?
The Jenkins service is running under the Local System account. Can it be that Automatic Package Restore is not correctly installing the SlowCheetah files in the AppData folder? The build is looking for them there, but can't find them:
Project "C:\Tools\Jenkins\jobs\Test1\workspace\Build.msbuild" on node 1 (default targets).
"C:\Tools\Jenkins\jobs\Test1\workspace\.nuget\NuGet.exe" restore "C:\Tools\Jenkins\jobs\Test1\workspace\TestMain.sln"
Installing 'SlowCheetah 220.127.116.11'.
Successfully installed 'SlowCheetah 18.104.22.168'.
"C:\Tools\Jenkins\jobs\Test1\workspace\Applications\TestMvc\TestMvc.csproj" (default target) (11) ->
(TransformAllFiles target) ->
C:\Tools\Jenkins\jobs\Test1\workspace\Applications\TestMvc\Properties\SlowCheetah\SlowCheetah.Transforms.targets(150,5): error MSB4062: The "SlowCheetah.Xdt.TransformXml" task could not be loaded from the assembly C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\MSBuild\SlowCheetah\v22.214.171.124\SlowCheetah.Xdt.dll. Could not load file or assembly 'file:///C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\MSBuild\SlowCheetah\v126.96.36.199\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. [C:\Tools\Jenkins\jobs\Test1\workspace\Applications\TestMvc\TestMvc.csproj]
I checked with explorer and there is no AppData folder available under the Local System account.
I've installed the version 2.5.10 and it doesn't work anymore. Please fix or let me download the 188.8.131.52 version.
Error 9 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.
Error 42 The "SlowCheetah.Xdt.TransformXml" task could not be loaded from the assembly C:\Users\MYUSER\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10\SlowCheetah.Xdt.dll. Could not load file or assembly 'file:///C:\Users\MYUSER\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.
Just some extra info... I found the following folder (it's a x64 system):
But it has no content inside :-(
I have a Web.Debug.config file that logs to a debug log file instead of the release version. In VS 2010, after I upgraded to the extension version 2.5.10, it would no longer transform web.config in debug mode. After I installed the NuGet SlowCheetah package 2.5.5, then would it start working again (installing the latest SlowCheetah NuGet did not work).
After upgrading to VS 2013, even with using SlowCheetah NuGet 2.5.5, it's no longer transforming web.config in debug mode. I also tried NuGet package 184.108.40.206 and it still doesn't work. The Preview Transform function shows the correct transform being applied.
Any help would be greatly appreciated.
We are encountering the following error on many computer, we just downloaded the latest version, and we are trying it on VS2013:
The "SlowCheetah.Xdt.TransformXml" task could not be loaded from the assembly C:\Users\Ahmad\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10\SlowCheetah.Xdt.dll. Could not load file or assembly 'file:///C:\Users\Ahmad\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.
We tried to search the path, there is two folders:
C:\Users\Ahmad\AppData\Local\Microsoft\MSBuild\SlowCheetah\v220.127.116.11; this contains the vs extension,
C:\Users\Ahmad\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10; this contains a copy of my project !!! what is that?
I am getting the following build error
Error 28 Could not copy "bin\Debug\app.config" to "C:\Users\ara\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10\bin\Debug\app.config". Exceeded retry count of 10. Failed.
If I delete all files (except 2 files) in
then I can build the project. However, after that I cannot build another project in the same solution
Error 17 Could not copy the file "bin\Debug" to the destination file "C:\Users\ara\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10\bin\Debug", because the destination is a folder instead of a file. To copy the source file into a folder, consider using the DestinationFolder parameter instead of DestinationFiles.
Why is this happening? It seems like the SlowCheetah is trying to write the projects output to the same directory.
I don't know if this is relevant, when I run install-package SlowCheetah I get the following:
PM> install-package SlowCheetah
'SlowCheetah 18.104.22.168' already installed.
[ProjectName] already has a reference to 'SlowCheetah 22.214.171.124'.
Failed to generate binding redirects for '[ProjectName]'. 'Microsoft.Tools.WindowsInstallerXml.VisualStudio.WixProjectNode' does not contain a definition for 'References'
Great tool! One problem though: When you try to transform a root-element Visual Studio tells me: Could not write Destination file: Object reference not set to an instance of an object.
I'm using VS2012 Update 3 and SlowCheetah 126.96.36.199 (NuGet package). An example of my config file (Invoice.Debug.config):
<?xml version="1.0" encoding="utf-8" ?>
<InvoicePaymentService xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform" cancelUrl="http://mysite.nl/winkelen/geannuleerd/" returnUrl="http://onderwijsadvies.preview.gengu.nl/winkelen/bedankt/" debug="False" testMode="True" xdt:Transform="Replace">
I've tested it with multiple config files and settings. Re-created the transforms etc...
Not sure if the installer got botched, but after upgrading to 2.5.10 from 188.8.131.52, our test machine began to copy files into a C:\Users\user.x.name\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10 directory. The files it copied were the project files that were being built. I was able to work around the issue by defining the SlowCheetahToolsPath in the SlowCheetah.Transforms.targets file to define the tool path. Is there something I can do so I don't have to hack the targets file manually in order to get SC to work?
After both a VS restart and machine restart, SC is still creating a v2.5.10 directory next to the v1 directory in the user profile\local\microsoft\msbuild\slowcheetah directory. The contents of the directory seem to be all of the project files for any project that contains transforms. They get copied over each other as a project with a transform is processed. When I uninstall and reinstall SC, the problem persists.
I worked around this problem with a conditional Using in my SC tarets file. Stick these two lines in @ line 36 in your C:\Users\<you>\AppData\Local\Microsoft\MSBuild\SlowCheetah\v1\SlowCheetah.Transforms.targets file. The 2nd using will use the correct v1 location.
<UsingTask TaskName="SlowCheetah.Xdt.TransformXml" AssemblyFile="$(sc-MSBuildLibPathLocal)SlowCheetah.Xdt.dll" Condition="Exists('$(sc-MSBuildLibPathLocal)SlowCheetah.Xdt.dll')"/>
<UsingTask TaskName="SlowCheetah.Xdt.TransformXml" AssemblyFile="SlowCheetah.Xdt.dll" Condition="Exists('SlowCheetah.Xdt.dll')"/>
I'm getting the following error message when trying to use SlowCheetah 2.5.10:
Error 45 The "SlowCheetah.Xdt.TransformXml" task could not be loaded from the assembly C:\Users\hrcorval\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10\SlowCheetah.Xdt.dll. Could not load file or assembly 'file:///C:\Users\hrcorval\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.TestSuitesUI
This problem was not happening when using version 2.5.5, and it started happening after updating to this version.
Are you using Ncrunch?
If you are you must include the slowcheetah package in Ncrunch.
You didn't have to do this in verison 2.5.5
I'm not using Ncrunch yet, I'm just using NUnit framework. What I did was to install the SlowCheetah package from Visual Studio Gallery, add transforms in the configuration file and compile the solution.
I'm currently using VS Ultimate 2012 with .Net fwk 4.5
I'm new to SlowCheetah and was wondering if someone could provide a simple example for me. I've setup a simple C# app, and I added one setting to the settings called ServerName. In the App.Config file I see:
<setting name="ServerName" serializeAs="String">
I've right clicked on App.config and created the transform files and I see them. I'm having trouble with the syntax of the transform. I've tried several variations, but I think:
<add key="ServerName" value="DevServer" xdt:Transform="Replace" xdt:Locator="Match(key)"/>
<add name="ServerName" xdt:Transform="Replace" xdt:Locator="Match(name)">
Should be correct but it's not working. What am I missing?
Thanks in advance for your help!
Okay, I figured it out:
<setting name="ServerName" serializeAs="String" xdt:Transform="Replace">
works. Is this the best way?
My example above is missing an xdt:Locator and will drive you nuts. here's some example transforms which are working for me:
<!-- We don't want to change the Flow Through setting so nothing special has to be done -->
<!-- To Delete a setting, use the Transform Remove -->
<setting name="DeleteThisSetting" xdt:Transform="Remove" xdt:Locator="Match(name)"/>
<!-- To Change a Setting, use the Transform Replace -->
<setting name="ATweakedSetting" serializeAs="String" xdt:Transform="Replace" xdt:Locator="Match(name)">
<value>This Setting was tweaked in app.debug.config</value>
<!-- To Add a Setting, Use Transform Insert-->
<setting name="AnotherAddedSetting" serializeAs="String" xdt:Transform="Insert">
<value>This Setting was added in app.debug.config.</value>
<!-- if you want to get REAL picky on where it goces, use Insert After -->
<!-- The xpath expression does the heavy lifting -->
<setting name="AnotherAddedSettingPlacedAfterServerName" serializeAs="String"
<value>This Setting was added in app.debug.config.</value>
Basically I'm trying to integrate into build process on TFS and I'm following instructions from a blog post you had. It is not showing the extra project that you are mentioning in the post.
Please see question on StackOverflow.