I'm trying to host an existing application as a guest executable in Service Fabric. This work very well, but now I'm facing a problem I don't have a solution for so far.
The application we have is a Windows service build using .NET. It does include an app.config file containing some environment specific configuration. On our current platform we create packages and deploy them using MSDeploy. MSDeploy supports the usage of parameters which can transform the web.config file. This way we can change the configuration based on the environment we deploy on.
How can we achieve this using a guest executable in Service Fabric? The guest executable and app.config are added to the code-package of the sfproj. Is there a way we can transform the app.config when we instantiate a new instance of the Service Fabric application? I know of the config package and ApplicationParameter files but they can't transform app.config files, can they? Is there another way we can do this?