From aad2d2c688d2ecab1dfa153e0ee2648370370e04 Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Mon, 1 Jul 2024 15:13:12 +0100 Subject: [PATCH] Add Build Error XA1038 --- Documentation/docs-mobile/TOC.yml | 2 ++ Documentation/docs-mobile/messages/index.md | 1 + Documentation/docs-mobile/messages/xa1038.md | 21 +++++++++++++++++++ .../Xamarin.Android.Resource.Designer.targets | 5 +++++ .../Properties/Resources.resx | 7 +++++++ 5 files changed, 36 insertions(+) create mode 100644 Documentation/docs-mobile/messages/xa1038.md diff --git a/Documentation/docs-mobile/TOC.yml b/Documentation/docs-mobile/TOC.yml index ef5e9432fa8..5ff19de355c 100644 --- a/Documentation/docs-mobile/TOC.yml +++ b/Documentation/docs-mobile/TOC.yml @@ -236,6 +236,8 @@ href: messages/xa1036.md - name: XA1037 href: messages/xa1037.md + - name: XA1038 + href: messages/xa1038.md - name: "XA2xxx: Linker" items: - name: "XA2xxx: Linker" diff --git a/Documentation/docs-mobile/messages/index.md b/Documentation/docs-mobile/messages/index.md index f5cb16b1759..055bf07acd7 100644 --- a/Documentation/docs-mobile/messages/index.md +++ b/Documentation/docs-mobile/messages/index.md @@ -142,6 +142,7 @@ or 'Help->Report a Problem' in Visual Studio for Mac. + [XA1036](xa1036.md): AndroidManifest.xml //uses-sdk/@android:minSdkVersion '29' does not match the $(SupportedOSPlatformVersion) value '21' in the project file (if there is no $(SupportedOSPlatformVersion) value in the project file, then a default value has been assumed). Either change the value in the AndroidManifest.xml to match the $(SupportedOSPlatformVersion) value, or remove the value in the AndroidManifest.xml (and add a $(SupportedOSPlatformVersion) value to the project file if it doesn't already exist). + [XA1037](xa1037.md): The '{0}' MSBuild property is deprecated and will be removed in .NET {1}. See https://aka.ms/net-android-deprecations for more details. ++ [XA1038](xa1038.md): The '{0}' MSBuild property has an invalid value. Value values are {1}. ## XA2xxx: Linker diff --git a/Documentation/docs-mobile/messages/xa1038.md b/Documentation/docs-mobile/messages/xa1038.md new file mode 100644 index 00000000000..2d81e5db057 --- /dev/null +++ b/Documentation/docs-mobile/messages/xa1038.md @@ -0,0 +1,21 @@ +--- +title: .NET for Android error XA1038 +description: XA1038 error code +ms.date: 06/27/2024 +--- +# .NET for Android error XA1038 + +## Example messages + +``` +The 'AndroidResourceDesignerClassModifier' MSBuild property has an invalid value of 'foo'. Value values are 'public/private/internal'. +``` + +## Solution + +Edit your csproj directly and remove the referenced MSBuild property. + +Test your project to ensure the new behavior is functionally equivalent. + +If not, file an [issue](https://github.com/xamarin/xamarin-android/issues) so a +solution can be found before the deprecated flag is removed. diff --git a/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Resource.Designer.targets b/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Resource.Designer.targets index 0970c1f60af..6256e9273dd 100644 --- a/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Resource.Designer.targets +++ b/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Resource.Designer.targets @@ -101,6 +101,11 @@ Copyright (C) 2016 Xamarin. All rights reserved. + The following are literal names and should not be translated: MSBuild, .NET. {0} - The deprecated MSBuild property name {1} - The numeric version of .NET + + + The '{0}' MSBuild property has an invalid value of '{1}''. Value values are '{2}'. + The following are literal names and should not be translated: MSBuild. +{0} - The MSBuild property name which has invalid values. +{1} - The current value of the property +{2} - The list of valid values. The Android Support libraries are not supported in .NET 9 and later, please migrate to AndroidX. See https://aka.ms/net-android/androidx for more details.