Add NuGet package compatibility rules documentation#52775
Open
ericstj wants to merge 6 commits intodotnet:mainfrom
Open
Add NuGet package compatibility rules documentation#52775ericstj wants to merge 6 commits intodotnet:mainfrom
ericstj wants to merge 6 commits intodotnet:mainfrom
Conversation
Add a new article under library guidance that documents the compatibility rules NuGet packages must follow, covering: - Framework compatibility and assembly consistency across TFMs - Assembly version rules (never decrease, binary breaking changes) - Dependency compatibility (avoiding dropped dependencies, polyfill patterns) - Assembly versioning on .NET Framework (GAC, binding redirects) - Special versioning policy for packages overlapping with shared frameworks - Conflict resolution (SDK and runtime) and NuGet package pruning Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Library Guidance article that consolidates NuGet package compatibility/versioning rules into a single reference, and wires it into the Library guidance > NuGet TOC.
Changes:
- Add a new documentation page:
nuget-package-compatibility-rules.md. - Add the new page to
docs/standard/library-guidance/toc.ymlunder the NuGet section.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| docs/standard/library-guidance/toc.yml | Adds the new article to the NuGet subsection so it shows up in navigation. |
| docs/standard/library-guidance/nuget-package-compatibility-rules.md | New article documenting framework, assembly, and dependency compatibility expectations for NuGet packages, plus shared-framework overlap guidance. |
docs/standard/library-guidance/nuget-package-compatibility-rules.md
Outdated
Show resolved
Hide resolved
docs/standard/library-guidance/nuget-package-compatibility-rules.md
Outdated
Show resolved
Hide resolved
docs/standard/library-guidance/nuget-package-compatibility-rules.md
Outdated
Show resolved
Hide resolved
- Add ai-usage: ai-assisted to frontmatter - Fix Microsoft.BCL.* casing to Microsoft.Bcl.* to match actual package IDs - Replace first-person 'We recommend' with imperative voice - Fix broken prune packages link to point to NU1510 docs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
docs/standard/library-guidance/nuget-package-compatibility-rules.md
Outdated
Show resolved
Hide resolved
docs/standard/library-guidance/nuget-package-compatibility-rules.md
Outdated
Show resolved
Hide resolved
docs/standard/library-guidance/nuget-package-compatibility-rules.md
Outdated
Show resolved
Hide resolved
docs/standard/library-guidance/nuget-package-compatibility-rules.md
Outdated
Show resolved
Hide resolved
Explain why compatible TFM builds must present compatible API surface at both compile time and run time, with link to NuGet target framework selection docs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Standardize 'run time' to 'runtime' throughout - Use 'might' instead of 'may' for possibility per docs style - Convert full learn.microsoft.com URLs to docset-root-relative links - Use auto-numbering (1. for all items) in ordered lists Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
gewarren
approved these changes
Mar 31, 2026
docs/standard/library-guidance/nuget-package-compatibility-rules.md
Outdated
Show resolved
Hide resolved
docs/standard/library-guidance/nuget-package-compatibility-rules.md
Outdated
Show resolved
Hide resolved
docs/standard/library-guidance/nuget-package-compatibility-rules.md
Outdated
Show resolved
Hide resolved
docs/standard/library-guidance/nuget-package-compatibility-rules.md
Outdated
Show resolved
Hide resolved
nkolev92
reviewed
Mar 31, 2026
Contributor
nkolev92
left a comment
There was a problem hiding this comment.
Lots of great content here. 👏
docs/standard/library-guidance/nuget-package-compatibility-rules.md
Outdated
Show resolved
Hide resolved
docs/standard/library-guidance/nuget-package-compatibility-rules.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Co-authored-by: Nikolche Kolev <nikolev@microsoft.com>
…ay artifacts - Clarify 'compatible versions' to 'compatible package versions or frameworks' - Broaden text to explain both cross-version and cross-TFM dependency rules - Fix 'run-time' to 'runtime' - Remove stray list marker from package pruning section - Trim trailing whitespace Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nkolev92
approved these changes
Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new article under the library guidance section documenting the compatibility rules that NuGet packages must follow. This captures institutional knowledge from internal discussions, GitHub issues, and existing scattered documentation into a single authoritative reference.
Topics covered
Major.Minor.0.0for packages overlapping with .NET shared frameworks; conflict resolution at build time (ResolvePackageFileConflicts) and at run time (the .NET host); NuGet package pruning (.NET 9 opt-in, .NET 10 default)Related resources
This article links to and complements existing docs:
Internal previews