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've been coding large financial trading frameworks in VS/C# since .NET 1.1 days (12/13 years). From this perspective, I can affirmatively state that Slow Cheetah is by far the most productive package that is not currently integrated into the VS tool. I'm walking through a major rollout now involving five different staging environments and over twenty different server configs. Without Slow Cheetah, the other 35 people in the deployment team waiting on my builds would be left high and dry while I tried to manage the configs by hand. VS management - what the *hell* are you thinking? Integrate!
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".
I have WebApp I have been using SC on successfully but after the 2.5.5 update the publish fails. I get "Could not write Destination file: access to the path******** denied. The path is my connection.config file which as the transforms. I remove the transforms and the build succeeds. Is the 2.5.1 or 2.5.2 build available for download to see if the issue goes away? I am using VS 2010
I've heard of this issue but have been unable to reproduce it. For a project which has this issue could you try the following. In the packages folder there is a SlowCheetah folder. Under that you will find a tools folder. Can you replace the SlowCheetah.Transforms.targets with the file at https://raw.github.com/sayedihashimi/slow-cheetah/1f90325f2d1a72f221fe116289c1a8c14c43ccfa/SlowCheetah/Resources/Install/SlowCheetah.Transforms.targets. After that close and re-open VS and see if the issue continues or not. If that fixes it I may ask you for some build logs to see what the difference is here.
This seems to have worked. I had to place the targets file under MSbuilds as I didn't have packages folder. It did successfully build the solution and the transforms look correct. I noticed a change of reference between the two targets files.
This file: https://raw.github.com/sayedihashimi/slow-cheetah/1f90325f2d1a72f221fe116289c1a8c14c43ccfa/SlowCheetah/Resources/Install/SlowCheetah.Transforms.targets
It's not available. I'm getting a 404 error on that site.
Has this been solved yet? I'm having the exact same problem. I have just setup xml transformation and on my first build on the build server I'm getting this access error.
I'm using VS12 Update2. Changing that .targets file manually is not a solution for us because we are using package restore on the server. I don't want to check-in that slowcheetah package.
System: VS2010 Ultimate SP1, TFS 2010 (also build server), SlowCheetah 2.5.5
On a brand new project, I added SlowCheetah 2.5.5 via NuGet to my web project. As many others have stated, it did not build correctly when run on my MSbuild server. It would continually error out with "... SlowCheetah.Transforms.Could not write Destination file: access to the path '(fullpath)\Application.Config' is denied." Since I did not have a previous version also installed, I could not use the previously suggested .targets file since that requires the SlowCheetah.Tasks.dll library.
Through the NuGet package manager, I removed v2.5.5 from my project and added SlowCheetah.Tasks.Unofficial instead. After checking in all of the solution/project changes associated with switching versions and running a new build, the project built successfully.
TL;DR: If you're using SlowCheetah 2.5.5 and getting the 'Destination file access denied' error, try switching to SlowCheetah.Tasks.Unofficial available in NuGet.
After further testing, using SlowCheetah.Tasks.Unofficial was not correctly transforming files upon running MSBuild. I reverted back to SlowCheetah 22.214.171.124 (via the package manager console), modified my build per http://sedodream.com/2012/12/24/SlowCheetahBuildServerSupportUpdated.aspx and everything is happy again - transforms work perfectly.
I'm still not able to reproduce this. I looked a log files from two different machines in which one works and the other doesn't and still was not able to see what the issue was. I was thinking that the issue was isolated to Visual Studio.
This is the first that I'm hearing of this from a build server.
Martin, could you help me out here? If you could that would be awesome. Could you produce a build log of a 2.5.5 project failing and then convert to 2.5.3 and succeeding?
My email is email@example.com.
Sayed Ibrahim Hashimi
Could this error be related as to whether or not you have 4.0 or 4.5 installed?
I see this error on machines configured like mine using VS2010 Pro except that .NET 4.5 is installed on my and isn't installed on their machines (they have .NET 4.0 though)
I think there might be an issue with .NET 4.5 not installed that is causing this.
I did a clean install of VS2010, SP1, MVC 3, MVC4 and .NET 4.0. The build wasn't working correctly with the MSBuild task for Slow Cheetah 2.5.5. I then installed .NET 4.5 and the build started working fine with my setup and the MSBuild task for Slow Cheetah 2.5.5
Please look into this if at all possible
I can confirm that this is an issue with .NET 4.5. I'm using VS2012 Professional with TFS 2010 as a build server. I checked in the SlowCheetah package and my build server got ""Could not write Destination file...." error. After installing .NET 4.5 on the build server the build is now working.
Having the same issue as the users above. Did anyone get this working? I have a solution with a console app proj, a web app proj, and a test proj. I used nuget to install SlowCheetah (2.5.5) in the console app proj. It shows in the packages.config. Right-clicking on my App.config file does not show Add Transform menu item. Any help?
Thanks, I think at the time you wrote the entry the NuGet package would only work with projects which had use the VS extension to add the Import. Since then I've fixed that and if you directly install the package it adds the Import.
Could you please elaborate on that? I just installed the VS extension and added the NuGet package instead, so that my team can use SlowCheetah without installing the extension. In doing that, the "Add Transform" disappeared.
In the description of your tool it is said
"When you build your applicatoin the files are transformed and dropped into the output directory. "
"For web projects the files are transformed ONLY when you publish or package your application."
How can I invoked the transformation to debug web project without publish?
I've asked the question on http://stackoverflow.com/questions/10332800/how-to-replace-web-config-with-transformed-for-debug-file-when-running-wap-in-vi, but haven't get a good suggestion.
i have a Wpf-project with SlowCheetah on board. The project include a folder with the settings.config file. It's an XML-file with different settings. I added a transform to it for the Release configuration. And it work when i build the project. With Debug build i have one config, and with release build i Have another. So far so good. But when i publish the project i always get Debug config. Can you help me?
Some details: VS2012, SlowCheetah 2.5.5, the settings.config has Build Action=Content, and it is always copied into output.
There is a sample project to illustrate the problem but i don;t know how to attach it.
Hi, I'd like to exclude certain transformation files from source control because they contain sensitive info. I noticed I have the option to exlude the app.config file, but not the "subfiles" created by this extension. How can I make sure the sensitive info doesn't make it's way to source control?
Hello, I have a hard time to set up app.config, app.debug.config and app.release.config in my console application.
If in the local app.config there is “<add key="ServiceID" value="R2" />”. And in the server it should be
<add key="ServiceID" value="R1" />.
I can’t use “R1” in mylocal machine to debug, otherwise an exception is thrown out.
I did add <appSettings xdt:Transform="Replace"> in the app.release.config.
Then the value is “R1” in app.release.config and it is “R2” in app.debug.config. Is it right?
1) What is the value in app.config? "R1" or "R2"? I need a direct answer.
2) When I check in the code app.config, What is the value in app.config?
A little explaination is appreciated.
I have just installed and am using Slow-Cheetah. I am using it to transform my Log.config which is used by Log4Net. It is modifying the original config file, and not just the config file in the output directory. This means that if if have an 'Insert' transform and build 3 times, I will get the XML element inserted 3 times into the original file.
Can you confirm this bug?
I've reproduced this with a bare bones project. It is an Empty Web Application and I am running the transforms on Log.config. You can see that if you build the app multiple times, the original Log.config file has the XML inserted every time.
The I am using VS2010 Ultimate SP1.
Thanks for sharing the project. When I extract this and run the app the source config file is not changed at all. I'm not sure what's going on here. What OS are you running? I have win 8 here.
One thing that might help here is to share a build log with me. For the project you shared, can you try the following. In VS go to Tools->Options->Projects and Solutions->Build and Run, set MSBuild output verbosity to Diagnostic. Kick off a build which causes the file to get modified. Copy and paste the build log from the output window. If you could email that to me at firstname.lastname@example.org I can compare it to that of my machine and see what the difference is here.
I think this is the same error I've mentioned above. It's attempting to write over the original source file: Could not write Destination file: Access to the path '***originalfilepath***' is denied. Windows 7 Professional, VS 2010.
I have a team member that is experiencing the issue while I am not being impacted. We both have pretty identical desktop images, however our VS installs are different (he has Pro 2010 while I have both Ult 2010 and Prem 2012). I'll get diagnostic traces from both his and my version of the same project and send them to you as well.
My colleague and I have downloaded the repro project and have verified that his environment is affected while mine is not. Both he and I ran builds with diagnostic output enabled and the one main thing I see is that in my log (which is transforming correctly) I see the following:
OriginalItemSpec = C:\Users\user.x.name\Downloads\SlowCheetah\SlowCheetah\SlowCheetah\bin\**\*.*
The above lines are *not* present in my colleague's build log. I'll email you both logs in their entirety for you to investigate.
What I found is that the Targets file may be incorrect. I'm running Visual Studio 2010 Premium. Here's what I was getting:
6>Task "SlowCheetah.Xdt.TransformXml" (TaskId:286)
6> Transfroming source file: X:\**********************\Data\DataModelClient\ServerURLConfig.xml (TaskId:286)
6> Applying Transform File: ServerURLConfig.Debug.xml (TaskId:286)
6> Output File: bin\Debug\ServerURLConfig.xml (TaskId:286)
6>X:\**********************\packages\SlowCheetah.2.5.5\tools\SlowCheetah.Transforms.targets(101,5): error : Could not write Destination file: Access to the path 'X:\**********************\Data\DataModelClient\ServerURLConfig.xml' is denied.
6>Done executing task "SlowCheetah.Xdt.TransformXml" -- FAILED. (TaskId:286)
When I change the Destination attribute on the task as follows, it works properly:
Two things that I should have made note of: the transform was failing before because the XML file was read-only. The second is that referencing projects are copying the non-transformed XML into the bin directories. That may be an unrelated item, but is a result of the fact that the XML file is being transformed in the referenced projects bin folder instead of the XML source location.
Just installed SlowCheetah, love the concept. But I've run into a bit of a problem: after adding a transform, the files app.Release.config & app.Debug.config appear in the directory, but not in the solution list within visual studio (2010). That is, while app.config is there, no "+" is next to it, nor are the other two files shown anywhere. Any clue what I'm doing wrong? Or is this a known bug? I've tried creating a blank visual basic project, added in an app.config file, transformed it, and got the same result.
I have a web.config and some transformations for it. whenever i try to preview a transformation (great feature!) i see lots of changes. This is mainly because SlowCheetah strips additional spaces from my original config file, and thus showing lots changes. see this example image: http://screencast.com/t/mZPbrpVRudh
here you even see spaces are stripped out from comment. Is this by design?
Just right click on Add Transform on some XML file. It will add the NuGet package automatically if its not installed. Then make sure to enable package restore. With package restore even if the user doesn't have SlowCheetah installed the files will be transformed. SlowCheeth (the VS extension) just provides the VS command to add transform/preview. The rest of the functionality is in the NuGet package. That's one of the great benefits of this update.