HostingAbstractionsWebHostBuilderExtensions.UseEnvironment Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specify the environment to be used by the web host.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseEnvironment(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, System::String ^ environment);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseEnvironment (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, string environment);
static member UseEnvironment : Microsoft.AspNetCore.Hosting.IWebHostBuilder * string -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseEnvironment (hostBuilder As IWebHostBuilder, environment As String) As IWebHostBuilder
Parameters
- hostBuilder
- IWebHostBuilder
The IWebHostBuilder to configure.
- environment
- String
The environment to host the application in.
Returns
The IWebHostBuilder.