From 197fd1c607efbd0b829f7cf1fe51a934fc28a755 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Tue, 12 Jun 2018 14:42:40 -0500 Subject: [PATCH] Order of IHostingStartup Configure calls (#6969) --- .../configuration/platform-specific-configuration.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/aspnetcore/fundamentals/configuration/platform-specific-configuration.md b/aspnetcore/fundamentals/configuration/platform-specific-configuration.md index faf9311a46..0cf5606586 100644 --- a/aspnetcore/fundamentals/configuration/platform-specific-configuration.md +++ b/aspnetcore/fundamentals/configuration/platform-specific-configuration.md @@ -51,7 +51,7 @@ A [HostingStartup](/dotnet/api/microsoft.aspnetcore.hosting.hostingstartupattrib [!code-csharp[](platform-specific-configuration/snapshot_sample/StartupEnhancement.cs?name=snippet1)] -A class implements `IHostingStartup`. The class's [Configure](/dotnet/api/microsoft.aspnetcore.hosting.ihostingstartup.configure) method uses an [IWebHostBuilder](/dotnet/api/microsoft.aspnetcore.hosting.iwebhostbuilder) to add enhancements to an app: +A class implements `IHostingStartup`. The class's [Configure](/dotnet/api/microsoft.aspnetcore.hosting.ihostingstartup.configure) method uses an [IWebHostBuilder](/dotnet/api/microsoft.aspnetcore.hosting.iwebhostbuilder) to add enhancements to an app. `IHostingStartup.Configure` in the hosting startup assembly is called by the runtime before `Startup.Configure` in user code, which allows user code to overwrite any configruation provided by the hosting startup assembly. [!code-csharp[](platform-specific-configuration/snapshot_sample/StartupEnhancement.cs?name=snippet2&highlight=3,5)] @@ -111,13 +111,15 @@ The shared framework version reflects the version of the shared runtime that the Set the following environment variables in the context of the app that uses the enhancement. -ASPNETCORE\_HOSTINGSTARTUPASSEMBLIES +ASPNETCORE_HOSTINGSTARTUPASSEMBLIES Only hosting startup assemblies are scanned for the `HostingStartupAttribute`. The assembly name of the implementation is provided in this environment variable. The sample app sets this value to `StartupDiagnostics`. The value can also be set using the [Hosting Startup Assemblies](xref:fundamentals/host/web-host#hosting-startup-assemblies) host configuration setting. -DOTNET\_ADDITIONAL\_DEPS +When multiple hosting startup assembles are present, their [Configure](/dotnet/api/microsoft.aspnetcore.hosting.ihostingstartup.configure) methods are executed in the order that the assemblies are listed. + +DOTNET_ADDITIONAL_DEPS The location of the implementation's *\*.deps.json* file.