In previous versions of ASP.NET many of us used Web.Debug.config/Web.Release.config files trasformations that would look something like this:
Web.config:
<connectionStrings><add name="AppDB" connectionString="Data Source=(LocalDb)\\..." /></connectionStrings>
Web.Release.config:
<connectionStrings><add name="AppDB" connectionString="Data Source=(ReleaseDb)\\..." xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/></connectionStrings>
As per
ASP.NET vNext tutorial you still can use Web.config. But config.json appear to be the new way to handle configurations now as per the same article:
config.json
{"Data": {"DefaultConnection": {"ConnectionString": "Server=(localdb)\\..." } } }
And in Startup.cs:
var configuration = new Configuration(); configuration.AddJsonFile("config.json"); configuration.AddEnvironmentVariables();
So I'm wondering what would be the suggested way to handle config-transofrmation with this shift to json?
p.s. I've also added the same question on
StackOverflow