8
votes

Scenario:

I have a class library project with custom .config files. Build Action for these config files are set to 'Content' and 'Copy Always'. This library project is then referenced in at least 4-5 console applications within the same solution. When the solution is built the class library's assembly and the custom config files are copied on to the the referenced projects bin folder.

What I am trying to do:

Use SlowCheetah to transform custom config files

Problem:

Though SlowCheetah transforms the config files within the class library project it doesn't copy the transformed file into the referenced projects. i.e it always copies the source/original file.

Found couple of other threads but none of them were solutions based on SlowCheetah, any suggestions would be helpful. Note that I am using Install Shield Limited Edition, so the solution needs to work for .msi/setup files. Also, I dont want to link files and apply transform on the linked files as then I would have to do the same transform on all referenced projects.

Thanks

2
I have tried putting a post build step with an xcopy into the console project(s) but it still copied the untransformed version. The only thing I can think at this point is that it's some kind of timing issue. Perhaps the transform is happening post-post-build?!Josh Gallagher
Having the same issue here, for me its the NLog.config file that i have added transforms too. Same issue, the file is transformed but not copiedworkabyte

2 Answers

0
votes

Given ClassLibararyA references ClassLibraryB:

  • Ensure configs from both class libraries are named App.config
  • Configure transformations for both App.configs using SlowCheetah (even if you only care about one)
  • Build

In the output folder for ClassLibraryA, you will find ClassLibraryB.dll.config (the transformed App.config of ClassLibraryB).

0
votes

I know this is not a solution but this is what i have found on the issue as i am having the same issue. Adding this here as it is way too much to add to a comment and hopefully it will eventually be the answer when they close the bug.

I know slow cheetah is in maintenance mode but they are still fixing bugs and it does look like Microsoft will be picking up the project so hopefully they get this fixed.

Found this case here where they admit it is a bug but then seems they fix a different issue.

https://github.com/sayedihashimi/slow-cheetah/issues/34

so i opened a new bug report here

https://github.com/sayedihashimi/slow-cheetah/issues/174