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

后端 未结 6 2136
甜味超标
甜味超标 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:08

    In solution explorer right click on your file that want to be copied to output (in your case appsettings.dev.json) and hit Properties, In Properties window pane set Copy To Output Directory option to Copy Always. By doing so, every time you build your project, your file will be copied into output directory (your project bin or release directory depending on your build profile)

提交回复
热议问题