title: How to set value for a key in appsettings.json file during build time
body: <p>For my ASP.NET core solution, I have an appsettings.json file and it looks like this</p>
  
  <pre><code>{
    "Branch": {
      "Name": "test"
    },
  }
  </code></pre>
  
  <p>If I want to replace value for "Branch.Name" to some other text, for example "prod" at <em>build</em> time. How do I achieve that?</p>
  
  <p>EDIT: I am aware of the "ASPNETCORE_ENVIRONMENT" environment variable and environment-specific appsettings file for .net core. But unfortunately, for some reason hard to explain, I still need to set value for a key in "appsettings.json" file at build time...</p>