How can I ensure that appsettings.dev.json gets copied to the output folder?

后端 未结 6 2139
甜味超标
甜味超标 2020-12-05 15:17

I have three configuration files, one for each environment:

  1. appsettings.json -> production
  2. appsettings.dev.json -> development
  3. appsettings.s
6条回答
  •  醉话见心
    2020-12-05 16:11

    In my case, appsettings.json is not being copied for unit tests.

    If you right click the file and choose Properties, this dialog will come up. Change Build Action to Embedded resource and the file will be copied to the bin folder for the unit test to pick up.

提交回复
热议问题