Always check out ads on GitHub for beta.
As announced here , the IApplicationEnvrionment interface IApplicationEnvrionment been removed from ASP.NET Core RC2.
To get the path in the Startup method do this
public Startup(IHostingEnvironment hostingEnvironment) { var builder = new ConfigurationBuilder() .SetBasePath(hostingEnvironment.ContentRootPath) ... }
If you need it outside, you can use the PlatformServices.Default static method to access specific types or register it in an IoC container and enable it elsewhere. Later preferable to most customs.
Tseng
source share