12

I want to use Slow Cheetah for transform .config file. Currently I am using Visual Studio 2017 and for this I have installed Slow Cheetah 2.5.48 from nuget but 'Add Transform' does not appear when I right-click on config file.

Swati Gupta
  • 753
  • 2
  • 8
  • 30

6 Answers6

35

The issue is, only adding nugget would not suffice. You need to install slowcheetah from visual studio marketplace. Following are the steps:

  1. Install SlowCheetah from Tools > Extensions and Updates
  2. Restart VS, allowing for the VSIX installer to run
  3. Create new C# App (.NET Framework). (In my case, it started to work on existing app also.)

GitHub Reference

Himanshu Singla
  • 390
  • 3
  • 11
  • For people looking at this with latest VS 2019 updates, Extensions can now be found next to the 'Tools' button as its own separate section. – danny10846 Oct 15 '21 at 07:21
7

As a work-around you could do this by hand. Make a copy in the _Solution Explorer* of your Web.config and rename it to Web.Debug.config or whatever you like.

Unload the project and then Edit the project. Find the ItemGroup element that contains your newly created config file and add the <DependentUpon>Web.config</DependentUpon> element there, like so:

enter image description here

After that, it will look like this in the Solution Explorer:

enter image description here

Now you can edit your newly added config file with the required transformations.

Emiel Koning
  • 4,039
  • 1
  • 16
  • 18
  • Yes that is a solution but I want to do this using Slow Cheetah. – Swati Gupta Jun 16 '17 at 12:39
  • Yes. It is described here. https://github.com/Microsoft/slow-cheetah/blob/master/doc/transforming_files.md A NuGet package is available for integration with the build. – Emiel Koning Jun 17 '17 at 16:29
  • Ok but Slow Cheetah is not working on Visual Studio 2017. I also tried your solution which you have mentioned above but it is also not working in VS 2017. – Swati Gupta Jun 17 '17 at 18:07
  • Did you read the Getting Started section on the link I posted earlier? The extension that is mentioned is for VS2015-2017. That will add the **Add transform** context menu item and also a **Preview transform**. You'll need the NuGet package that is specified to have your config transformed during the build. – Emiel Koning Jun 17 '17 at 18:13
  • Yes I have installed extension as well as nuget package already. – Swati Gupta Jun 17 '17 at 18:20
  • And you don't see those extra context menu options when right clicking an `App.config`? – Emiel Koning Jun 17 '17 at 18:43
  • Yes I don't see – Swati Gupta Jun 19 '17 at 03:41
5

I had the same issue. I installed the NuGet package 2.5.48 and then was able to download and install the vsix file from here and it worked:

https://github.com/sayedihashimi/slow-cheetah/releases

Brian Davis
  • 745
  • 1
  • 11
  • 14
2
  1. Download it here https://marketplace.visualstudio.com/items?itemName=WillBuikMSFT.SlowCheetah-XMLTransforms or search for "SlowCheetah" in Visualstudio marketplace,
  2. install it
  3. restart you VS and see. Good luck
PriscillaZ
  • 49
  • 3
0

Correct as @Himanshu Singla and many others here are saying, in addition to installing nuget package, you still need to download the Extension from Tools->Extensions and Updates-> Search "Slow Cheetah", install and restart VS.

Coder Dev
  • 113
  • 2
  • 9
0

I had to do the following before it worked:

  1. Install the package from their site instead of from NuGet
  2. List item

Restart VS

Then the Add Transform option started showing up in the drop-down menu.

Abdelrahman ELGAMAL
  • 414
  • 2
  • 7
  • 15