2014-12-09 4 views

Antwort

3

Laut David Fowler, das nicht existiert, und es gibt keine Pläne, es hinzuzufügen:

@vcsjones: Gibt es zur Zeit, oder wird es sein, so etwas wie XDT Transformationen für project.json?

@davidfowl: Nö

Source

7

Nur falls jemand kommt sonst über diese. Während Sie XDT-Transformationen nicht tun können. Mit Config.json können Sie umgebungsspezifische Konfigurationen hinzufügen.

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

Verwandte Themen