You can inject the service IHostingEnvironment in your view by doing
@inject Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnv
and do a @hostingEnv.EnvironmentName
You can inject the service IHostingEnvironment in your view by doing
@inject Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnv
and do a @hostingEnv.EnvironmentName