diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/ResolveAssemblies.cs b/src/Xamarin.Android.Build.Tasks/Tasks/ResolveAssemblies.cs index 65bc3684cc5..7ab4bd7f9d4 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/ResolveAssemblies.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/ResolveAssemblies.cs @@ -192,6 +192,10 @@ string ResolveRuntimeAssemblyForReferenceAssembly (LockFile lockFile, string ass path = Path.Combine (folder.Path, libraryPath.Path, runtime.Path).Replace('/', Path.DirectorySeparatorChar); if (!File.Exists (path)) continue; + // _._ means its provided by the framework. However if we get here + // its NOT. So lets use what we got in the first place. + if (Path.GetFileName (path) == "_._") + return assemblyPath; return path; } return null; 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 3c5b9c1b0d3..0cc66af38a3 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 @@ -426,6 +426,10 @@ protected override void OnResume() KnownPackages.SupportCompat_25_4_0_1, KnownPackages.SupportV7AppCompat_25_4_0_1, KnownPackages.XamarinForms_2_3_4_231, + new Package () { + Id = "System.Runtime.Loader", + Version = "4.3.0", + }, } }; app.MainActivity = @"using System;