diff --git a/build-tools/xaprepare/xaprepare/Application/KnownProperties.cs b/build-tools/xaprepare/xaprepare/Application/KnownProperties.cs
index dd2c7c733c0..2d9fd7efcfa 100644
--- a/build-tools/xaprepare/xaprepare/Application/KnownProperties.cs
+++ b/build-tools/xaprepare/xaprepare/Application/KnownProperties.cs
@@ -58,6 +58,7 @@ static class KnownProperties
public const string XABuildToolsPackagePrefix = "XABuildToolsPackagePrefix";
public const string XABinRelativeInstallPrefix = "XABinRelativeInstallPrefix";
public const string XAInstallPrefix = "XAInstallPrefix";
+ public const string XAPackagesDir = "XAPackagesDir";
public const string XAPlatformToolsVersion = "XAPlatformToolsVersion";
public const string XAPlatformToolsPackagePrefix = "XAPlatformToolsPackagePrefix";
}
diff --git a/build-tools/xaprepare/xaprepare/Application/Properties.Defaults.cs.in b/build-tools/xaprepare/xaprepare/Application/Properties.Defaults.cs.in
index 2d0bd087f0c..6e59af3ab6e 100644
--- a/build-tools/xaprepare/xaprepare/Application/Properties.Defaults.cs.in
+++ b/build-tools/xaprepare/xaprepare/Application/Properties.Defaults.cs.in
@@ -62,6 +62,7 @@ namespace Xamarin.Android.Prepare
properties.Add (KnownProperties.XABuildToolsPackagePrefix, StripQuotes ("@XABuildToolsPackagePrefix@"));
properties.Add (KnownProperties.XABinRelativeInstallPrefix, StripQuotes (@"@XABinRelativeInstallPrefix@"));
properties.Add (KnownProperties.XAInstallPrefix, StripQuotes (@"@XAInstallPrefix@"));
+ properties.Add (KnownProperties.XAPackagesDir, StripQuotes (@"@XAPackagesDir@"));
properties.Add (KnownProperties.XAPlatformToolsVersion, StripQuotes ("@XAPlatformToolsVersion@"));
properties.Add (KnownProperties.XAPlatformToolsPackagePrefix, StripQuotes ("@XAPlatformToolsPackagePrefix@"));
}
diff --git a/build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.cs b/build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.cs
index 2d7289696c2..af2831a6dc8 100644
--- a/build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.cs
+++ b/build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.cs
@@ -263,7 +263,7 @@ public static partial class Paths
// not really configurables, merely convenience aliases for more frequently used paths that come from properties
public static string XAInstallPrefix => ctx.Properties.GetRequiredValue (KnownProperties.XAInstallPrefix);
- public static string XAPackagesDir = DetermineNugetPackagesDir (ctx);
+ public static string XAPackagesDir => ctx.Properties.GetRequiredValue (KnownProperties.XAPackagesDir);
static string GetNetcoreAppRuntimePath (Context ctx, string androidTarget)
{
@@ -276,17 +276,6 @@ static string GetNetcoreAppRuntimePath (Context ctx, string androidTarget)
);
}
- static string DetermineNugetPackagesDir (Context ctx)
- {
- return Path.GetFullPath (
- Path.Combine (
- ctx.Properties.GetRequiredValue (KnownProperties.PkgXamarin_LibZipSharp),
- "..",
- ".."
- )
- );
- }
-
static string EnsureAndroidToolchainBinDirectories ()
{
if (androidToolchainBinDirectory != null)
diff --git a/build-tools/xaprepare/xaprepare/xaprepare.targets b/build-tools/xaprepare/xaprepare/xaprepare.targets
index 1afe7e363b1..4c8e3be8906 100644
--- a/build-tools/xaprepare/xaprepare/xaprepare.targets
+++ b/build-tools/xaprepare/xaprepare/xaprepare.targets
@@ -96,6 +96,7 @@
+