Skip to content

Document .NET 11 NU1703 warning for deprecated MonoAndroid package assets#54108

Open
Copilot wants to merge 5 commits into
mainfrom
copilot/fix-nu1703-warning
Open

Document .NET 11 NU1703 warning for deprecated MonoAndroid package assets#54108
Copilot wants to merge 5 commits into
mainfrom
copilot/fix-nu1703-warning

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 1, 2026

NuGet restore now emits NU1703 for Android projects that target .NET 11+ when package restore selects deprecated MonoAndroid assets, with behavior gated by SdkAnalysisLevel >= 11.0.100. This PR adds the .NET 11 breaking-change documentation and links it from the relevant compatibility and SDK guidance surfaces.

  • Breaking change article

    • Added docs/core/compatibility/sdk/11/nu1703-deprecated-monoandroid-framework.md.
    • Captures previous vs. new behavior, reason for change, recommended actions, and compatibility impact.
  • .NET 11 compatibility index

    • Updated docs/core/compatibility/11.md under SDK and MSBuild with a new NU1703 entry (Source incompatible).
  • Compatibility TOC

    • Updated docs/core/compatibility/toc.yml to include the new NU1703 article under .NET 11 > SDK and MSBuild.
  • Related SDK guidance

    • Updated docs/core/project-sdk/msbuild-props.md (SdkAnalysisLevel table) to point the NU1703 behavior to the new breaking-change article.
Package 'PackageName' 1.0.0 uses the deprecated MonoAndroid framework instead of 'net6.0-android' or later. Consider upgrading to a newer version of this package or contacting the package author.

Internal previews

📄 File 🔗 Preview link
docs/core/compatibility/11.md Breaking changes in .NET 11
docs/core/compatibility/sdk/11/nu1703-deprecated-monoandroid-framework.md NU1703 warning for packages that use deprecated MonoAndroid framework assets
docs/core/compatibility/toc.yml docs/core/compatibility/toc

Copilot AI review requested due to automatic review settings June 1, 2026 15:58
Copilot AI review requested due to automatic review settings June 1, 2026 15:58
Copilot AI requested review from Copilot and removed request for Copilot June 1, 2026 16:06
Copilot AI changed the title [WIP] Fix NU1703 warning for packages using deprecated MonoAndroid framework Document .NET 11 NU1703 warning for deprecated MonoAndroid package assets Jun 1, 2026
Copilot AI requested a review from gewarren June 1, 2026 16:23
Comment thread docs/core/compatibility/sdk/11/nu1703-deprecated-monoandroid-framework.md Outdated
Comment thread docs/core/compatibility/sdk/11/nu1703-deprecated-monoandroid-framework.md Outdated
Comment thread docs/core/compatibility/sdk/11/nu1703-deprecated-monoandroid-framework.md Outdated
Comment thread docs/core/project-sdk/msbuild-props.md Outdated
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 1, 2026 16:32
@gewarren gewarren marked this pull request as ready for review June 1, 2026 16:32
@gewarren gewarren requested a review from a team as a code owner June 1, 2026 16:32
@gewarren gewarren requested a review from sbomer June 1, 2026 16:33
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

Documents a new .NET 11 breaking change: NuGet restore emits NU1703 when Android projects targeting .NET 11+ (with SdkAnalysisLevel >= 11.0.100) resolve deprecated MonoAndroid package assets. The new article is wired into the .NET 11 compatibility index, the compatibility TOC, and referenced from the SdkAnalysisLevel table in the SDK project properties doc.

Changes:

  • New breaking-change article describing previous/new behavior, reason, recommended action, and opt-out via SdkAnalysisLevel.
  • TOC and .NET 11 compatibility index entries added for the new article.
  • msbuild-props.md updated so the NU1703 row links to the new article instead of the generic NuGet error reference.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
docs/core/compatibility/sdk/11/nu1703-deprecated-monoandroid-framework.md New breaking-change article for NU1703 MonoAndroid deprecation.
docs/core/compatibility/11.md Adds NU1703 entry to SDK and MSBuild table.
docs/core/compatibility/toc.yml Adds TOC entry under .NET 11 > SDK and MSBuild.
docs/core/project-sdk/msbuild-props.md Redirects NU1703 link in SdkAnalysisLevel table to the new article.

Comment thread docs/core/project-sdk/msbuild-props.md Outdated
| 10.0.300 | 'Restore' multi-targeting with duplicate target frameworks | Enables [multi-targeting with duplicate target frameworks](/nuget/consume-packages/package-references-in-project-files#multi-targeting-with-duplicate-frameworks) using `TargetFramework` alias. |
| 10.0.300 | `TargetFramework` character validation | Emits [NU1019](/nuget/reference/errors-and-warnings/nu1019) error for path separator characters (`/` or `\`) in a `TargetFramework` property, and [NU1019](/nuget/reference/errors-and-warnings/nu1019) warning for non-ASCII characters. |
| 11.0.100 | MonoAndroid framework deprecation warning | Emits [NU1703](/nuget/reference/errors-and-warnings/nu1703) warning when a package uses the deprecated `MonoAndroid` framework instead of a modern .NET target framework moniker. |
| 11.0.100 | MonoAndroid framework deprecation warning | Emits [NU1703](../compatibility/sdk/11/nu1703-deprecated-monoandroid-framework.md) warning when a package uses the deprecated `MonoAndroid` framework instead of a modern .NET target framework moniker. |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's already NuGet/docs.microsoft.com-nuget#3542 - do we need a new doc in dotnet/docs? Most of the other links here point to nuget docs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
| 11.0.100 | MonoAndroid framework deprecation warning | Emits [NU1703](../compatibility/sdk/11/nu1703-deprecated-monoandroid-framework.md) warning when a package uses the deprecated `MonoAndroid` framework instead of a modern .NET target framework moniker. |
| 11.0.100 | MonoAndroid framework deprecation warning | Emits [NU1703](/nuget/reference/errors-and-warnings/nu1703) warning when a package uses the deprecated `MonoAndroid` framework instead of a modern .NET target framework moniker. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I didn't notice that CCA changed the link. It should link out to the warning reference like it did previously.

The new doc in this repo is a breaking change reference, not a warning reference, so I think it is needed. Do you not normally document breaking changes for new NuGet warnings?

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.

[Breaking change]: NU1703 warning for packages using deprecated MonoAndroid framework

4 participants