Skip to content

Commit

Permalink
Add Build Error XA1038
Browse files Browse the repository at this point in the history
  • Loading branch information
dellis1972 committed Jul 2, 2024
1 parent 5c90bae commit aad2d2c
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Documentation/docs-mobile/TOC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions Documentation/docs-mobile/messages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
21 changes: 21 additions & 0 deletions Documentation/docs-mobile/messages/xa1038.md
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ Copyright (C) 2016 Xamarin. All rights reserved.
<!-- Creates a Resource.designer.cs file in the Intermediate output path which derives from the
Designer Assembly, for backward compatability.
-->
<AndroidError Code="XA1038"
ResourceName="XA1038"
FormatArguments="AndroidResourceDesignerClassModifier;$(AndroidResourceDesignerClassModifier);public/private/internal"
Condition=" '$(AndroidResourceDesignerClassModifier)' != 'public' And '$(AndroidResourceDesignerClassModifier)' != 'private' And '$(AndroidResourceDesignerClassModifier)' != 'internal' "
/>
<GenerateResourceDesignerIntermediateClass
IsApplication="$(AndroidApplication)"
Namespace="$(AndroidResgenNamespace)"
Expand Down
7 changes: 7 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,13 @@ To use a custom JDK path for a command line build, set the 'JavaSdkDirectory' MS
<comment>The following are literal names and should not be translated: MSBuild, .NET.
{0} - The deprecated MSBuild property name
{1} - The numeric version of .NET</comment>
</data>
<data name="XA1038" xml:space="preserve">
<value>The '{0}' MSBuild property has an invalid value of '{1}''. Value values are '{2}'.</value>
<comment>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.</comment>
</data>
<data name="XA1039" xml:space="preserve">
<value>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.</value>
Expand Down

0 comments on commit aad2d2c

Please sign in to comment.