Reputation: 1935
I would like to have a different appsettings for MacOS and Windows. How can I retrieve from the Startup class the OS running my app in order to load the right appsettings.json ?
Upvotes: 2
Views: 22
Reputation: 36736
public Startup(
IConfiguration configuration,
IHostingEnvironment env
)
{
var os = RuntimeInformation.OSDescription + " " + RuntimeInformation.OSArchitecture.ToString();
}
Upvotes: 3