Running with values from selected web.%.config

34 Views Asked by At

In .NET Core if running with ASPNETCORE_ENVIRONMENT=Devlopment the values in appsettings.json will be overwriten by appsettings.Development.json values if they are set, and the Development file is read.

But that doesn't seem to be the case with web.config

enter image description here

Is there a way to achieve it so that when I'm running on Debug build, the AppKey setting will be taken from Web.Debug.config file and not Web.config? I looked into web.config transforms, but from what I understood it only happens when doing a publish

0

There are 0 best solutions below