From 7af1e3ac13ab9420c6a7c2a365f9cb03aec58c8d Mon Sep 17 00:00:00 2001 From: Frulfump Date: Fri, 1 May 2026 18:05:14 +0200 Subject: [PATCH] Update caching-nuget.md with SDK version pinning advice Added recommendation to pin .NET SDK version for consistency. --- docs/pipelines/artifacts/caching-nuget.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/pipelines/artifacts/caching-nuget.md b/docs/pipelines/artifacts/caching-nuget.md index 0e9f7f5def3..3ee6eafe094 100644 --- a/docs/pipelines/artifacts/caching-nuget.md +++ b/docs/pipelines/artifacts/caching-nuget.md @@ -36,6 +36,9 @@ To lock your project's dependencies, add the **RestorePackagesWithLockFile** pro ``` +> [!NOTE] +> It's also recommended to pin the version of the .NET SDK that's used so the SDK version and dependency graph stay in lockstep. See [global.json](/dotnet/core/tools/global-json) and especially the `rollForward` section with the `disable` value [global.json rollForward Policy](/dotnet/core/tools/global-json#rollforward). For related issues when not pinning, see [ASP.NET Core GitHub issue](https://github.com/dotnet/aspnetcore/issues/65061) and [.NET Core SDK GitHub issue](https://github.com/dotnet/sdk/issues/48795) + ## Cache NuGet packages To cache NuGet packages, define a pipeline variable that points to the location of the packages on the agent running the pipeline.