M
M
mindgrow2021-09-26 13:41:00
ASP.NET
mindgrow, 2021-09-26 13:41:00

How to implement transformations in ASP NET Core?

It is necessary to configure the transformation for the
appsettings.json
launchSettings.json files

and the
Dev1
Dev2
Dev3
Test
Prod configuration

So that when the appropriate configuration is selected, the corresponding transformation occurs and the required application launch port and database are set

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-09-26
@vabka

No transformation is needed.
Just start appsetting.*.json, where instead of * is the name of the profile.
And in launchessettings you set the appropriate DOTNET_ENVIRONMENT.
On startup, the base appsettings.json + appsettings.*.json will be selected
Here are more details about this mechanism:
https://blog.elmah.io/config-transformations-in-as...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question