Update XA1006 warning text #8801
Labels
Area: App+Library Build
Issues when building Library projects or Application projects.
enhancement
Proposed change to current functionality.
Milestone
Context: https://developercommunity.visualstudio.com/t/Maui-compile--publish-for-Play-Console-/10608668#T-ND10611876
The XA1006 warning needs to be reconsidered for a .NET world. It originated in Xamarin.Android (#2050, 55ba747), and states:
Warning XA4211 is the same-yet-different:
The problem is that
$(TargetFrameworkVersion)
is a Classic Xamarin.Android construct. In .NET, it would be$(TargetFramework)
, or maybe$(TargetPlatformVersion)
(?).There is also now a
$(TargetPlatformMinVersion)
property (lol?).Then there's the NETSDK1135 error:
XA1006 & XA4211 should be updated to use the correct MSBuild property names, and also we should reconsider whether it should be emitted at all; in .NET 8,
net8.0-android
isnet8.0-android34
, and there is no earlier$(TargetPlatformVersion)
value supported (i.e.net8.0-android33.0
does not exist and will error out). Consequently, every "real" .NET app will be expected to emit an XA1006, as$(TargetPlatformVersion)
/"compile SDK version" will (almost) always be higher than//uses-sdk/@android:targetSdkVersion
.Steps to Reproduce
Create a new project:
dotnet new android
Edit
AndroidManifest.xml
to add:Build it in Release config:
dotnet build -c Release
Actual results: a warning
(Aside:
''
is rather offputting there…)Desired results: do we need to warn at all anymore?
The text was updated successfully, but these errors were encountered: