Skip to content

Update caching-nuget.md with SDK version pinning advice#14369

Open
Frulfump wants to merge 1 commit intoMicrosoftDocs:mainfrom
Frulfump:patch-2
Open

Update caching-nuget.md with SDK version pinning advice#14369
Frulfump wants to merge 1 commit intoMicrosoftDocs:mainfrom
Frulfump:patch-2

Conversation

@Frulfump
Copy link
Copy Markdown

@Frulfump Frulfump commented May 1, 2026

Added recommendation to pin .NET SDK version for consistency.

See comment from Microsoft(Chet) here dotnet/sdk#48795 (comment)

Our current recommendation for users that use lock files is to also lock their SDK versions via global.json with no rollforward, so they(sic) their entire toolchain stays in lockstep.

Related dotnet/docs#53347

(The docs page doesn't have an easy way to know which page you can contribute to like the .NET pages does would be great if you had the same!
image
)

Added recommendation to pin .NET SDK version for consistency.
@prmerger-automator
Copy link
Copy Markdown
Contributor

@Frulfump : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@v-regandowner
Copy link
Copy Markdown
Contributor

@ramiMSFT

Can you review the proposed changes?

IMPORTANT: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the NuGet caching guidance in Azure Pipelines docs by adding a recommendation to pin the .NET SDK version (via global.json) when using lock files, to keep restores consistent across environments.

Changes:

  • Adds a new NOTE recommending .NET SDK version pinning with global.json.
  • Links to global.json documentation (including rollForward=disable) and related upstream issues for context.

```

> [!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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants