Skip to content

Commit

Permalink
Remark on clearing caches in NuGet scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
guardrex committed Aug 29, 2018
1 parent 2b399b4 commit 37562f0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions aspnetcore/fundamentals/host/platform-specific-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 37562f0

Please sign in to comment.