Search code examples
app-configtransformsetup-projectsetup-deploymentslowcheetah

How do I configure Setup And Deployment Project to use transformed app config?


I've been using SlowCheetah to transform my app.config files and this part is all working fine. The correct transforms are applied to AppName.exe.config when I build the windows client application.

The problem I have is that the S&D Project always looks for app.config which obviously does not contain the updated values.

How can I configure the S&D project to look for AppName.exe.config and package that instead?


Solution

  • After some lengthy research it seems this is not possible when building an MSI using VS 2010 Setup & Deployment. It may be possible to do with MSBUILD as this is more powerful and flexible but I currently don't have the time to explore that avenue in detail.

    So for the time being as a temporary workaround I have entered the values in app.config for the production environment as this is what the MSI will use. My transforms are still in place for other environments. But seeing as I don't deploy to other environments with MSI it doesn't really matter.

    At some stage I will sort this all out with a build server and CI.

    Hope this helps someone, someday.