I'm trying out VS2015 with all the new features and I was wondering if I can still apply a tranformation on the project.json or config.json file? Like what we could do with web.config => web.Debug.config and web.Release.config.
Just in case someone else comes across this. While you cant do XDT Transformations. With Config.json you can add environment specific configurations.
// 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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With