Is it possible to configure a WebSetup project to not overwrite config files?
Why? We have severa开发者_Python百科l websites that runs in both staging and prod and I would like to have one installer instead of one for staging and one for prod.
/Carl
I've done some googling and it seems like there are a bunch of different solutions to separate staging settings from prod settings. And this way might not be the best.. It's more of quick and dirty solution.
This is how I solved it.
- Add the config file to your WebSetup project.
- Mark the file as Permanent.
Now the file will stay on the server when you remove the Webapplication. So change it to prod settings, and the next time you will deploy your awesome Webapplication it will not overwrite the existing config file(s).
The big downside of this is that you have to add new settings manually to the config files when add new settings in the application.
精彩评论