Skip to content

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

@sbomer

Description

@sbomer

Description

NuGet restore now emits warning NU1703 when a project targeting net11.0-android or later assets from the deprecated MonoAndroid framework folder in a package, instead of modern net6.0-android+ assets. The warning is gated on SdkAnalysisLevel >= 11.0.100 and only applies to Android-targeting projects with framework version ≥ 11. See NuGet/NuGet.Client#7229 (NuGet/NuGet.Client#7229).

Version

.NET 11 Preview 5

Previous behavior

NuGet restore silently resolved MonoAndroid assets from packages when no modern net6.0-android+ assets were available, without any warning.

New behavior

NuGet restore emits NU1703:
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.

Type of breaking change

  • Binary incompatible: Existing binaries might encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
  • Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code might require source changes to compile successfully.
  • Behavioral change: Existing binaries might behave differently at run time.

Reason for change

The MonoAndroid TFM is deprecated. Packages shipping only MonoAndroid assets are not guaranteed to be compatible with modern net11.0-android+ projects. This warning helps developers identify packages that need updating.

Recommended action

  • Upgrade to a newer version of the package that targets net6.0-android or later.
  • If no updated package is available, suppress the warning per-package (NU1703 on the
    PackageReference) or project-wide. Consider contacting the library author to request an updated package.
  • Set SdkAnalysisLevel below 11.0.100 to opt out entirely.

Feature area

SDK

Affected APIs

No response

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

Status

🔖 Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions