SlowCheetah: Transformed files from class library project not copied to the referenced projects
Asked Answered
H

2

8

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

Highpowered answered 18/12, 2013 at 15:29 Comment(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?!Unscreened
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 copiedContrariwise
N
0

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).

Naji answered 8/8, 2014 at 21:15 Comment(1)
The OP mentioned "custom config files" which I think are not app.config files. I have a SlowCheetah transform on both the app.configs and I agree that ClassLibraryB's config is transformed before being copied into ClassLibraryA's bin folder. However, there are other .config files in ClassLibraryB that have SlowCheetah transforms. Their "Copy to Output Directory" properties are set to "Copy Always" or "Copy if Newer". The transform is applied before they go into ClassLibraryB's bin folder, but not applied to the version that ends up in ClassLibraryA's folder. That's the issue here.Unscreened
C
0

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

Contrariwise answered 16/6, 2015 at 15:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.