'Running with values from selected web.%.config

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



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source