Only conditionally include <uses-sdk /> in the AndroidManifest.xml wh…#227
Only conditionally include <uses-sdk /> in the AndroidManifest.xml wh…#227
Conversation
jonathanpeppers
left a comment
There was a problem hiding this comment.
So the design for these should be that:
$(TargetPlatformVersion)is<uses-sdk android:targetSdkVersion$(SupportedOSPlatformVersion)is<uses-sdk android:minSdkVersion
$(SupportedOSPlatformVersion) is the only one that is possible to be blank, but it's in the project template.
Details here: https://learn.microsoft.com/en-us/dotnet/maui/migration/android-projects?view=net-maui-8.0#changes-to-androidmanifestxml
In what case are you able to make both of these blank?
|
@jonathanpeppers net-android projects apparently don't build if AndroidManifest.xml has What this patch does is remove the Without this change, the In other words, there's no way for the user to remove it unless they edit it in a text editor and manually remove it. But if they go back into the UI editor ever in the future to change something, it will get added right back. This patch fixes that scenario. |
|
@jonathanpeppers I just added some tests |
Changes: dotnet/android-tools@ed102fc...a698a33 * dotnet/android-tools@a698a33: Merge pull request dotnet/android-tools#227 from xamarin/dev/jestedfa/uses-sdk * dotnet/android-tools@8b13954: Added unit tests * dotnet/android-tools@84c2911: Only conditionally include <uses-sdk /> in the AndroidManifest.xml when saving Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Changes: dotnet/android-tools@ed102fc...a698a33 * dotnet/android-tools@a698a33: Merge pull request dotnet/android-tools#227 from xamarin/dev/jestedfa/uses-sdk * dotnet/android-tools@8b13954: Added unit tests * dotnet/android-tools@84c2911: Only conditionally include <uses-sdk /> in the AndroidManifest.xml when saving Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…en saving
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1874249