2014-12-09 15 views
6

Tüm yeni özelliklerle VS2015'i deniyorum ve proje.json veya config.json dosyasında hala bir dönüşüm uygulayabilir miyim diye merak ettim? Web.config => web.Debug.config ve web.Release.config ile yapabildiğimiz gibi. , Project.json için XDT dönüşümler böyle bir şey şu anda var mı, ya da olacak:VS2015'deki bir .json dosyasını dönüştürebilirsiniz

cevap

3

David Fowler göre, bu yok ve eklemek için bir plan yoktur:

@vcsjones?

@davidfowl: hayır

Source

7

Ne olur ne olmaz başkası bu rastlar. XDT Dönüşümleri yapamazken. Config.json ile ortama özgü konfigürasyonlar ekleyebilirsiniz.

// 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

İlgili konular