Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
interface Microsoft.​Extensions.​Hosting.​IHostingEnvironment
Assembly: Microsoft.Extensions.Hosting.Abstractions
Provides information about the hosting environment an application is running in. <para> This type is obsolete and will be removed in a future version. The recommended alternative is Microsoft.Extensions.Hosting.IHostEnvironment. </para>
Properties
string
ApplicationName
Gets or sets the name of the application. This property is automatically set by the host to the assembly containing
the application entry point.
ContentRootFileProvider
Gets or sets an <see cref="T:Microsoft.Extensions.FileProviders.IFileProvider" /> pointing at <see cref="P:Microsoft.Extensions.Hosting.IHostingEnvironment.ContentRootPath" /> .
string
ContentRootPath
Gets or sets the absolute path to the directory that contains the application content files.
string
EnvironmentName
Gets or sets the name of the environment. The host automatically sets this property to the value of the
of the "environment" key as specified in configuration.