From 37562f03d2d3d4a5c1d8ace2bae44ee5af38918c Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Wed, 29 Aug 2018 13:08:41 -0500 Subject: [PATCH] Remark on clearing caches in NuGet scenario --- .../host/platform-specific-configuration.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/aspnetcore/fundamentals/host/platform-specific-configuration.md b/aspnetcore/fundamentals/host/platform-specific-configuration.md index d5e4c701795e..b8f182f4268f 100644 --- a/aspnetcore/fundamentals/host/platform-specific-configuration.md +++ b/aspnetcore/fundamentals/host/platform-specific-configuration.md @@ -360,6 +360,13 @@ A hosting startup enhancement can be provided in a NuGet package. The package ha * The enhanced app's project file makes a package reference for the hosting startup in the app's project file (a compile-time reference). With the compile-time reference in place, the hosting startup assembly and all of its dependencies are incorporated into the app's dependency file (*\*.deps.json*). * The hosting startup's dependencies file is made available to the enhanced app as described in the [Runtime store](#runtime-store) section (without a compile-time reference). +> [!IMPORTANT] +> If you make changes to the *HostingStartupPackage* project and recompile it, clear the local NuGet package caches to ensure that the *HostingStartupApp* receives the updated package and not a stale package from the local cache. To clear the local NuGet caches, execute the following [dotnet nuget locals](/dotnet/core/tools/dotnet-nuget-locals) command: +> +> ```console +> dotnet nuget locals all --clear +> ``` + For more information on NuGet packages and the runtime store, see the following topics: * [How to Create a NuGet Package with Cross Platform Tools](https://docs.microsoft.com/dotnet/core/deploying/creating-nuget-packages) @@ -402,6 +409,12 @@ To run the sample: ``` 1. Observe that the service configuration key values rendered by the Index page match the values set by the package's `ServiceKeyInjection.Configure` method. +If you make changes to the *HostingStartupPackage* project and recompile it, clear the local NuGet package caches to ensure that the *HostingStartupApp* receives the updated package and not a stale package from the local cache. To clear the local NuGet caches, execute the following [dotnet nuget locals](/dotnet/core/tools/dotnet-nuget-locals) command: + +```console +dotnet nuget locals all --clear +``` + **Activation from a class library** 1. Compile the *HostingStartupLibrary* class library with the [dotnet build](/dotnet/core/tools/dotnet-build) command.