So, I just got myself my first project with legacy code, and even worse with a winforms app. Since I only did webapps until now you can guess I am not quite confident in my understanding of the whole eco-system. So please correct my if anything I describe seems to be wrong.
The app has a Settings.settings and a config.app file. Now (after the project is already 10 years old) they realized that they need a Dev and a Release set of these. My first task is to implement this.
I already came across this thread App.Config Transformation for projects which are not Web Projects in Visual Studio? which seems to lead to the correct answer, but does not work for me for multiple reasons:
- I could not get the transformation in the best voted answer (https://stackoverflow.com/a/5109530) to run. i.e. the [appname].exe.config was not filled with the app.dev.config information
- The information is accessed via
Properties.Settings.Default.somethingwhich is compiled with the information of the Settings.settings file, not the app.config and thus even if the [appname].exe.config was transformed, it would not read during runtime (correct me if I am wrong here) - Going with the "we want to do it like we always did it" the team wants to have a Settings.dev.settings file to not loose the ease of using the ui visual studio provides for this file, which would not be possible with the method described in the thread. Or at least I did not find any way.