I have an existing ASP.NET Core Web API app (targeting .NET Core 2.0) which I want to deploy to a Service Fabric cluster. The app contains multiple environment-specific appsettings.{env}.json
files. How can I deploy this to Service Fabric so that it picks DEV data from appsettings.Development.json
file and PROD data from appsettings.Production.json
.
At the moment, I use launchSettings.json
file to set them during my development.
There is an existing StackOverflow question which is very similar but that is specific to the non-ServiceFabric way of deployment which assumes we have access to the deployed application or IIS. My question is specific to Service Fabric deployment.