Hi,
Usually choosing the appropriate appsetting.json is done by setting an environment variable. More info in below article:
Hope this helps!
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have 3 App Registrations:
DevWebsite
TestWebsite
Website
We have a Release pipeline set up in Dev Ops for the website with 3 stages: Dev, Test and Production. They are set up as an IIS Deployment job with 2 tasks: IIS Web App Manage and IIS Web App Deploy.
Our existing ASP.NET websites are deployed in this way using web config transformations to ensure the Dev and Test stages point to our Dev and Test websites and databases. This works perfectly for the websites using web.config files.
However, I have a new .NET Core MVC app, set up for release in the same way but it uses appsettings.json instead of web.config and I can't find a way of doing the transformation for Dev and Test stages without commiting the appsettings.json file each time I want to more it through the release stages which is not ideal. Is there an equivalent transformation process for the appsettings.json files and if so, how do I set that up?
Hi,
Usually choosing the appropriate appsetting.json is done by setting an environment variable. More info in below article:
Hope this helps!
In case anyone else struggles with this - the answer to the question of an alternative to the web config transformation using appsettings.json for an IIS deployment on Azure would appear to be this article: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/transforms-variable-substitution?view=azure-devops&tabs=Classic#json-variable-substitution