diff --git a/build-tools/xaprepare/xaprepare/Application/GeneratedJavaInteropConfigPropsFile.cs b/build-tools/xaprepare/xaprepare/Application/GeneratedJavaInteropConfigPropsFile.cs
new file mode 100644
index 00000000000..d32b4276508
--- /dev/null
+++ b/build-tools/xaprepare/xaprepare/Application/GeneratedJavaInteropConfigPropsFile.cs
@@ -0,0 +1,32 @@
+using System.IO;
+
+namespace Xamarin.Android.Prepare
+{
+ class GeneratedJavaInteropConfigPropsFile : GeneratedFile
+ {
+ const string Content = @"
+
+
+
+
+ XA_JI_EXCLUDE
+
+
+";
+
+ public GeneratedJavaInteropConfigPropsFile (Context context)
+ : base (Path.Combine (Configurables.Paths.ExternalJavaInteropDir, "bin", $"Build{context.Configuration}", "XAConfig.props"))
+ {}
+
+ public override void Generate (Context context)
+ {
+ var dir = Path.GetDirectoryName (OutputPath);
+ if (!Directory.Exists (dir))
+ Directory.CreateDirectory (dir);
+
+ using var fs = File.Open (OutputPath, FileMode.Create);
+ using var sw = new StreamWriter (fs);
+ sw.Write (Content);
+ }
+ }
+}
diff --git a/build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.cs b/build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.cs
index 98649e3c6e7..a83a1ec51d1 100644
--- a/build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.cs
+++ b/build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.cs
@@ -66,6 +66,7 @@ protected override async Task Execute (Context context)
var steps = new List {
new GeneratedProfileAssembliesProjitemsFile (Configurables.Paths.ProfileAssembliesProjitemsPath),
new GeneratedMonoAndroidProjitemsFile (),
+ new GeneratedJavaInteropConfigPropsFile (context),
};
AddOSSpecificSteps (context, steps);
diff --git a/external/Java.Interop b/external/Java.Interop
index 3894cd76f71..00862adaf1f 160000
--- a/external/Java.Interop
+++ b/external/Java.Interop
@@ -1 +1 @@
-Subproject commit 3894cd76f71f618949c8542f0edd95762e22881f
+Subproject commit 00862adaf1f5447f2dcbff7b957083076da31a7b
diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs
index 5afcf9b908f..15d5f56fa71 100644
--- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs
@@ -87,11 +87,8 @@ public void CheckIncludedAssemblies ()
"Java.Interop.dll",
"Mono.Android.dll",
"System.Console.dll",
- "System.Linq.Expressions.dll",
- "System.ObjectModel.dll",
"System.Private.CoreLib.dll",
"System.Collections.Concurrent.dll",
- "System.Collections.dll",
"System.Linq.dll",
"UnnamedProject.dll",
} :