Commit 100d8c5
authored
Fixes: #10196
Customers reported that the XA4211 warning message contains outdated
property references and blank values for .NET 6+ projects:
AndroidManifest.xml: Warning XA4211 : AndroidManifest.xml //uses-sdk/@android:targetSdkVersion '34' is less than $(TargetFrameworkVersion) ''. Using API-35 for ACW compilation.
The warning was written during the Xamarin.Android timeframe and needs
updating for .NET 6+:
- **Property name**: `$(TargetFrameworkVersion)` should be
`$(TargetPlatformVersion)` for .NET 6+
- **Blank values**: The empty `''` appears because the message
references the wrong property
## Changes
Updated the XA4211 message in `Resources.resx`:
- Changed message text from `$(TargetFrameworkVersion)` to
`$(TargetPlatformVersion)`
- Updated comment documentation to reference the correct property
- Updated parameter description to reflect "target platform version
number"
This occurs when developers explicitly set a lower target SDK version
in their AndroidManifest.xml:
<uses-sdk android:targetSdkVersion="34" />
The warning is reasonable to show, but the message text should be
accurate for modern .NET Android projects.
1 parent 20de949 commit 100d8c5
File tree
3 files changed
+11
-5
lines changed- src/Xamarin.Android.Build.Tasks
- Properties
- Tasks
3 files changed
+11
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
607 | | - | |
608 | | - | |
| 607 | + | |
| 608 | + | |
609 | 609 | | |
610 | | - | |
| 610 | + | |
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
| |||
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
| |||
127 | 132 | | |
128 | 133 | | |
129 | 134 | | |
130 | | - | |
| 135 | + | |
131 | 136 | | |
132 | 137 | | |
133 | 138 | | |
| |||
142 | 147 | | |
143 | 148 | | |
144 | 149 | | |
145 | | - | |
| 150 | + | |
146 | 151 | | |
147 | 152 | | |
148 | 153 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
0 commit comments