@@ -800,7 +800,7 @@ public void TransitiveDependencyProduceReferenceAssembly ([Values] AndroidRuntim
800800 } ,
801801 }
802802 } ;
803- if ( runtime != AndroidRuntime . NativeAOT ) { // NativeAOT cannot build reference assemblies
803+ if ( runtime != AndroidRuntime . NativeAOT ) { // NativeAOT cannot build netstandard libraries
804804 lib2 . SetRuntime ( runtime ) ;
805805 }
806806 lib2 . SetProperty ( "ProduceReferenceAssembly" , "True" ) ;
@@ -903,10 +903,16 @@ public void CSProjUserFileChanges ([Values] AndroidRuntime runtime)
903903
904904 [ Test ]
905905 [ NonParallelizable ] // /restore can fail on Mac in parallel
906- public void ConvertCustomView ( )
906+ public void ConvertCustomView ( [ Values ] AndroidRuntime runtime )
907907 {
908+ bool isRelease = runtime == AndroidRuntime . NativeAOT ;
909+ if ( IgnoreUnsupportedConfiguration ( runtime , release : isRelease ) ) {
910+ return ;
911+ }
912+
908913 var path = Path . Combine ( "temp" , TestName ) ;
909914 var app = new XamarinAndroidApplicationProject {
915+ IsRelease = isRelease ,
910916 ProjectName = "MyApp" ,
911917 //NOTE: so _BuildApkEmbed runs in commercial tests
912918 EmbedAssembliesIntoApk = true ,
@@ -931,11 +937,13 @@ public CustomTextView(Context context, IAttributeSet attributes) : base(context,
931937 }
932938 }
933939 } ;
940+ app . SetRuntime ( runtime ) ;
934941 // Use a custom view
935942 app . LayoutMain = app . LayoutMain . Replace ( "</LinearLayout>" , "<MyApp.CustomTextView android:id=\" @+id/myText\" android:text=\" à请\" /></LinearLayout>" ) ;
936943
937944 int count = 0 ;
938945 var lib = new DotNetStandard {
946+ IsRelease = isRelease ,
939947 ProjectName = "MyLibrary" ,
940948 Sdk = "Microsoft.NET.Sdk" ,
941949 TargetFramework = "netstandard2.0" ,
@@ -945,6 +953,9 @@ public CustomTextView(Context context, IAttributeSet attributes) : base(context,
945953 } ,
946954 }
947955 } ;
956+ if ( runtime != AndroidRuntime . NativeAOT ) { // netstandard doesn't support AOT
957+ lib . SetRuntime ( runtime ) ;
958+ }
948959 //NOTE: this test is checking when $(ProduceReferenceAssembly) is False
949960 lib . SetProperty ( "ProduceReferenceAssembly" , "False" ) ;
950961 app . References . Add ( new BuildItem . ProjectReference ( $ "..\\ { lib . ProjectName } \\ { lib . ProjectName } .csproj", lib . ProjectName , lib . ProjectGuid ) ) ;
0 commit comments