Can you convert the * .json file to VS2015

I tried VS2015 with all the new features and I was wondering if I can still apply tranformation in the project.json or config.json file? Like what we can do with web.config => web.Debug.config and web.Release.config.

+6
source share
2 answers

According to David Fowler, this does not exist, and there are no plans to add it:

@vcsjones: are there currently or will there be any XDT changes for project.json?

@davidfowl: nope

A source

+3
source

Just in case someone comes across this. Although you can not convert XDT. With Config.json, you can add an environment-specific configuration.

// Setup configuration sources. var configuration = new Configuration() .AddJsonFile("config.json") .AddJsonFile($"config.{env.EnvironmentName}.json", optional: true); if (env.IsEnvironment("Development")) { // This reads the configuration keys from the secret store. // For more details on using the user secret store see http://go.microsoft.com/fwlink/?LinkID=532709 configuration.AddUserSecrets(); } configuration.AddEnvironmentVariables(); Configuration = configuration; 

Asp.Net 5.0 Docs → Configuration

+7
source

Source: https://habr.com/ru/post/979325/


All Articles