开发者

How to not overwrite exsiting config files with websetup

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.

  1. Add the config file to your WebSetup project.
  2. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜