External AppSettings File NOT merging with web.config

前端 未结 4 2040
长发绾君心
长发绾君心 2021-01-12 00:31

In my app, I have a web.config file with an appSettings section. The appSettings section contains a number of keys that the app uses. The appSettings section also contains

4条回答
  •  攒了一身酷
    2021-01-12 00:48

    I just had the same issue (configs not merging as expected), but after explicitly deleting the /bin and /obj directories from the solution-folder and performing a rebuild, everything worked as expected again, so I would suggest you try that and see how it works...

    PS: Also make sure you set the file properties of the external config to 'Copy Always'. Otherwise it won't exist in the bin-directory where your running application lives.

提交回复
热议问题