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 22.214.171.124 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 126.96.36.199. 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.
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.
My environment is VS 2010 Ultimate. I have a web app with 2 xml files - web.config and a metadata file for use with Indentity Framework. I have 3 build configurations set up.
FYI - I took the lazt way out on the transforms. Rather than including only the deltas in the transform file, I am doing a complete REPLACE action in the first node of the files.
I set up the web.config for Transform first, populated the transform files. The transform for the web.config works.
The metadata file is a different story. Right after the Add Transform step I knew something was up. This is the first line of the original file before the Add Transform:
<EntityDescriptor ID="_86192c4f-2aaa-43de-aec5-705f61278051" entityID="http://localhost/myapp/" xmlns="urn:oasis:names:tc:SAML:2.0:metadata"></EntityDescriptor>
Here's the first line of one of the transform files right after the Add Transform:
<EntityDescriptor xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform" xmlns="urn:oasis:names:tc:SAML:2.0:metadata"></EntityDescriptor>
As you can see several attributes are missing. I can add those back and everything is good. However, in this transform file the REPLACE action needs to be on the EntityDescriptor line. If I add the REPLACE transform action:
<EntityDescriptor xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform" xdt:Transform="Replace" ID="_86192c4f-2aaa-43de-aec5-705f61278051" entityID="http://localhost/SavaSecurity/" xmlns="urn:oasis:names:tc:SAML:2.0:metadata"></EntityDescriptor>
and try to preview it I get an error dialog "There was an error processing the transformation".
Not sure where to go from here. Am wondering whether the additional attributes on that line are causing a problem.
Your help will be appreciated......
I am using visual studio 2012 for a web-project and have tried slow cheeta to transform the different enviroment configurations. It works fine, but the estethics of the config-files are changed, like this:
Before (XML is split onto rows for readability in our configs)-
<site description="Example Site" siteId="some ID" licenseFilePath="drive\License.config">
<siteSettings enableScheduler="true" stringCompressionThreshold="0"
stringDelayedLoadThreshold="0" remoteWebServiceCulture="0" indexingDelayAfterPublish="00:00:20"...
After transform (extra blank rows are inserted into the config):
<site description="Example Site (new)" siteId="some other ID" licenseFilePath="drive\License.config">
<siteSettings enableScheduler="true" stringCompressionThreshold="0" stringDelayedLoadThreshold="0" remoteWebServiceCulture="0"
The configs still work since they are XML and have to "loose" value tags, but they look like crap and are hard to read if someone has to use notepad on a deploy server.
I am unsure if this is an issue with slow cheeta or vs 2012 in general. Anyone got a pointer what I might have done wrong or where I can look for a workaround if this is an issue with slow cheeta or VS 2012?
I have a web.config file which refers a bunch of external config files using configSource attribute on the configuration elements. I would like to know if there is a way to transform this web.config file using either "web transformations" or "slow cheetah" or any other method, so that each of the environments (Staging/QA/UAT) will pick up a different external config files ?
<add name="DBCon1" connectionString="...." providerName="System.Data.SqlClient" />
<add name="DBCon2" connectionString="...." providerName="System.Data.EntityClient" />
<add name="DBCon1" connectionString="foo" providerName="System.Data.SqlClient" />
<add name="DBCon2" connectionString="bar" providerName="System.Data.EntityClient" />
I want to know if there is a way to make the Web.config to point to Release.config file when the Release Configuration build is triggered from VS ?
Thanks in advance.
Hey guys. I've installed this tool at my last 2 jobs in VS2010, however, I can't seem to get it working with VS2012. IS there something different that needs to be done, or something I can check to make sure it installs correctly?
If I try to reinstall, it tells me that it has been installed for all applicable products
I just upgraded to 2.5, and now my publish fails with following error. Publish was working before upgrade.
AppData\Local\Microsoft\MSBuild\SlowCheetah\v1\SlowCheetah.Transforms.targets(170,11): Error MSB4057: The target "CoreCopyTransformFilesWap" does not exist in the project.
There may be a bug here, see my comment at <a href="https://github.com/sayedihashimi/slow-cheetah/issues/52">https://github.com/sayedihashimi/slow-cheetah/issues/52</a> for a method to revert back to the previous version until I can fix it.
I have a unit test assembly that has a app.config, which has multiple configurations config files setup. I've installed SlowCheetah 2.5.1. When I compile and run the unit test assembly, the dll gets copied to the appropriate bin folder but the transform has not been performed on the app.config file. Is there anything I can check to see if I've done something wrong?
I am running the unit tests locally, there is no CI process involved at this stage.
When I use VS2012 and preview the Transforms they all look good and work as expected.
I have the following XML in my transform file, and when it replaces the defined setting, the closing "</value>" tag is wrapped down to the next line and my setting value has a "\r\n " tacked on the end of the email address. Any idea what is causing that?
<setting name="FinanceEmailAddress" serializeAs="String" xdt:Locator="Match(name)" xdt:Transform="Replace">
I've updated to the latest (2.5) and now all config files except for web.config do not transform on a publish using VS2012. My publish profile name is the same as the transform file suffix (Publish1 and myconfig.Publish1.config). The transform preview works correctly. The previous version was working fine with the publish profiles I created. The published config files are not modified in any way (they still retain the original last modified date). I also used the vsix from issue 46 and the transform did not occur.
Can you give specific steps? I just tried the following and it worked.
1. Create a new project
2. Add transform details to web.debug.config/web.release.config
3. Add foo.xml
4. Add Transform on foo.xml
5. Add transform details to foo.debug.config/foo.release.config
6. Publish to an Azure Web Site using MSDeploy
From what I can see it looks like its working
File System publish for web only supports extensibility from the command line. When publishing from VS the same extensibility doesn't exist in the UI. So there is nothing SlowCheetah can do here. For this the best thing to do is open a bug at connect.microsoft.com.