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
We had several self-inflicted wounds with accidentally testing applications that had config entries that pointed to production instead of the quality assurance environment. Because of this we searched and found Slow Cheetah that let us separate the configs into Development, QA, and Production. Things are a lot safer now. Thanks for creating this.
Watched the Visual Studio Toolbox video on this some time ago, but have only just installed it. The tool is great and Its saving me heaps of time! No more building and deploying just to diff config files. Thanks for the work on this extension!
That is a cool stuff. That is to be installed on a develoer computer (VS). But how can I install on build server? Do you have any installation program for that?
Hi Yuri, see my blog post at http://sedodream.com/2012/12/24/SlowCheetahBuildServerSupportUpdated.aspx regarding how to get it working for build servers.
It's on the backlog https://github.com/sayedihashimi/slow-cheetah/issues/39. Should be the next major feature I work on. For web projects this support is much trickier than non-web projects.
Excellent. My app.config's are now updated with a Test, PreProd or Prod SQL Server connection string, even when running (rather than Deploying) my apps. A lifesaver - thanks!
Awesome! I'm just so used to web.config transforms in ASP.Net applications that I also want this functionality in a WinForms Application.
Your add-in works like a charm. Keep up the good work. I hope this add-in will be included into VS 2012 sometime in the future, just like they did with Nuget.
Even debug sessions are effected by the transform, depending on the selecte d solution configuration! Really nice work.
It won't be included in VS2012, and at this time it likely wont ever make it into VS. If you think it should I suggest you make a suggestion at http://visualstudio.uservoice.com/ and have all your friends vote it up.
Hi Sayed,
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.
Any clue?
Thanks!
Nico
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.
Does slowcheetah transform applicationSettings section?
I am trying to load different icon files for debug and release.
I'm trying to define a app.config file setting for icon and like to change it for release, but couldn't get it working.
SlowCheetah doesn't seem to mix with the Publish option in Visual Studio 2012. When installing, I get "File, NLog.config, has a different computed hash than specified in manifest."
Details at:
http://stackoverflow.com/q/12066623/141172
Hello,
Probably just a war
I am so new to MSBuild and trying to get those slow cheetah transformed app config files to a separate folder besides the web project output folder which is just the default bin\ folder.
At the moment they are in bin\app_config\bla2.config, i need to get them copied or targeted to ..\Webroot\Website\app_config\bla2.config
I copied the slowcheetah target file into my solution according your solution with continuous integration and tried playing around with that targets file a bit but no luck.
Is anyone able to help?
Cheers,
steve
If I understand you correct you are trying to copy the transformed app.config to a different folder after you build/publish? If so you should just be able to add an MSBuild target to perform the copy. Since you want the target to execute after the transforms then just add the attribute AfterTargets="TransformAllFiles". Then copy the files wherever you like.
Save yourself some time and buy my MSBuild book http://www.amazon.com/gp/product/0735645248?ie=UTF8&tag=sedodream-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0735645248. You won't regret it, look at the reviews.
Hi Sayed,
my issue might be related to "ASP.NET publish leaves debug and release versions".
I have three config files: myConfig.config, myConfig.Debug.config and myConfig.Release.config.
As you suggested in the discussion mentioned above I set <Build Action:None> for the Debug and Release configs, so there is only one config being copied to the server when I publish.
"Preview Transform" looks perfect for the Release config. However, this is not the file being copied to my server when I publish. Instead it is the original myConfig.config.
I'm using VS2012RC. No error messages!
Do you have any idea?
Thx
Ingmar
Hi Sayed,
great news.
And YES: My issue is fixed in 2.4.1. The final config file which is going to my server is the correct merge of myConfig.config and myConfig.Release.config.
However, it seems I still need to set the build action to None for both the debug and release config files ... otherwise (build action = Content) they get published to the server as well. But that's fine for me.
So, THANKS VERY MUCH. Your tool is a big help for me!
Hi iBode, in the latest release when you right-click Add Transforms it will add transforms using Build Action=None, but SlowCheetah will never change the Build Action of existing transforms. I just double checked with 2.4.1. If you are seeing otherwise can you give repro steps?
Hello Sayed,
everything you wrote is correct. I was just confused because my custom config files have Build Action=None whereas the "official" web.config is set Build Action=Content. I guess I just expected teh same behaviour here. That was all.
The main thing for me is: it's working great.
So, thanks again!
Ingmar
Hi all,
I'm thrilled that I found a working VS extension to transform my app.config files and I'm about to pass that along to the rest of my team.
I had no problems installing the extension or seeing it working in VS 2010.
That being said, I was looking into how to remove this extension and couldn't find SlowCheetah registered in the Add-In Manager in the IDE or in the usual locations for VS 2010 extensions.
See the link in MSDN Library where it explains where the Installation location is for vsix packages.
http://msdn.microsoft.com/en-us/library/ff363239.aspx
****
Installation Location
During installation, Extension Manager uncompresses the .vsix file and puts its contents in %LocalAppData%\Microsoft\VisualStudio\10.0\Extensions\Company\Product\Version\. Company, Product, and Version are specified in the extension.vsixmanifest file, and correspond to the namespace, project name, and version number that are set in the project properties.
By default, the installation applies only to the current user, because %LocalAppData% is a user-specific directory. However, if you set the AllUsers element of the manifest to True, the extension will be installed in ..\Visual Studio installation folder\Common7\IDE\Extensions\Company\Product\Version\, and will be available to all users of the system.
*****
So, if any of the developers in my team using this extension has any problems with it, how do they remove it?
Thanks in advance,
LizetP
I thought I answered this, but I can't find the answer. In any case.
To uninstall it you will need to open the Extension Manager in Visual Studio and then uninstall it from there. Also I filed a bug because uninstall does not remove the .targets files at C:\Users\{USER-NAME}\AppData\Local\Microsoft\MSBuild\SlowCheetah you should delete that folder as well. You can track the issue I created at https://github.com/sayedihashimi/slow-cheetah/issues/22.
Thanks,
Sayed Ibrahim Hashimi
Sayed,
Thank you for the prompt reply.
I was looking into the Add-In Manager in VS 2010. The extension shows fine in the Extension Manager and I already tried the uninstall feature.
I'll pass the info to my team.
Best regards,
LizetP
When i try to install the Slow Cheetah, i am getting below error message.
"Error HRESULT E_FAIL has been retuned from a call to a COM component."
Also i checked the event log, there is no error init.
I am using Windows XP, VS2010, .Net Framework 4.0 sp 1 is already installed in this machine.
Any help?
Thanks,
sudharsan
We do have many config files grouped under single web.config file in our web project. however I don't see "Preview Transform" for nested transformation file for particular nested configuration file.
So structure is similat to this:
web.config
web.Debug.config
web.Release.config
app.config
app.Debug.config
app.Release.config
So I'm not able to preview transformation for app.Release.config file.
Hi, this should now be fixed in the version that I just published. Can you try with the latest? FYI the closed issue can be tracked at https://github.com/sayedihashimi/slow-cheetah/issues/21.