How to publish environment specific appsettings in .Net core app?

后端 未结 12 2438
刺人心
刺人心 2020-12-04 15:33

I have 3 environment specific appsettings files in my .Net core application

in project.json I have setup publishOptions

12条回答
  •  Happy的楠姐
    2020-12-04 15:57

    You can use MSBuild conditions to optionally include files in the compilation output (or published output).

    
      
      
    
    

    The above ignores the Development and Staging appsettings.json file variants when the compilation target configuration is Release.

提交回复
热议问题