For my ASP.NET core solution, I have an appsettings.json file and it looks like this
{
"Branch": {
"Name": "test"
},
}
If I want to replace value for "Branch.Name" to some other text, for example "prod" at build time. How do I achieve that?
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...