diff --git a/Documentation/building/windows/instructions.md b/Documentation/building/windows/instructions.md
index ff6c1497dbc..91e28dc0135 100644
--- a/Documentation/building/windows/instructions.md
+++ b/Documentation/building/windows/instructions.md
@@ -36,7 +36,7 @@ MSBuild version 15 or later is required.
7. Build the project:
- msbuild Xamarin.Android.sln
+ msbuild /restore Xamarin.Android.sln
After the solution has built successfully, you can [use your
build][using-your-build] to build Xamarin.Android application and library
diff --git a/Makefile b/Makefile
index 5edbbfa9b3b..a89ba12d144 100644
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,7 @@ BOOTSTRAP_BUILD_LOG = bin/Build$(CONFIGURATION)/bootstrap-build.binlog
BOOTSTRAP_MSBUILD_FLAGS = /t:Restore,Build /binaryLogger:"$(BOOTSTRAP_BUILD_LOG)" $(PREPARE_COMMON_MSBUILD_FLAGS)
all:
- $(call MSBUILD_BINLOG,all,$(_SLN_BUILD)) $(MSBUILD_FLAGS) $(SOLUTION)
+ $(call MSBUILD_BINLOG,all,$(_SLN_BUILD)) /restore $(MSBUILD_FLAGS) $(SOLUTION)
-include bin/Build$(CONFIGURATION)/rules.mk
diff --git a/Xamarin.Android.sln b/Xamarin.Android.sln
index 7aa961114f1..886b869a7f3 100644
--- a/Xamarin.Android.sln
+++ b/Xamarin.Android.sln
@@ -78,10 +78,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK", "src\OpenTK-1.0\Op
{3F1F2F50-AF1A-4A5A-BEDB-193372F068D7} = {3F1F2F50-AF1A-4A5A-BEDB-193372F068D7}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Android.Cecil", "external\Java.Interop\src\Xamarin.Android.Cecil\Xamarin.Android.Cecil.csproj", "{15945D4B-FF56-4BCC-B598-2718D199DD08}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Android.Cecil.Mdb", "external\Java.Interop\src\Xamarin.Android.Cecil\Xamarin.Android.Cecil.Mdb.csproj", "{C0487169-8F81-497F-919E-EB42B1D0243F}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "proguard", "src\proguard\proguard.csproj", "{4B9D96BB-95AB-44E8-9F87-13B12C8BCED1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "api-xml-adjuster", "build-tools\api-xml-adjuster\api-xml-adjuster.csproj", "{8A6CB07C-E493-4A4F-AB94-038645A27118}"
@@ -263,14 +259,6 @@ Global
{5EB9E888-E357-417E-9F39-DDEC195CE47F}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{5EB9E888-E357-417E-9F39-DDEC195CE47F}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{5EB9E888-E357-417E-9F39-DDEC195CE47F}.Release|AnyCPU.Build.0 = Release|Any CPU
- {15945D4B-FF56-4BCC-B598-2718D199DD08}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
- {15945D4B-FF56-4BCC-B598-2718D199DD08}.Debug|AnyCPU.Build.0 = Debug|Any CPU
- {15945D4B-FF56-4BCC-B598-2718D199DD08}.Release|AnyCPU.ActiveCfg = Release|Any CPU
- {15945D4B-FF56-4BCC-B598-2718D199DD08}.Release|AnyCPU.Build.0 = Release|Any CPU
- {C0487169-8F81-497F-919E-EB42B1D0243F}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
- {C0487169-8F81-497F-919E-EB42B1D0243F}.Debug|AnyCPU.Build.0 = Debug|Any CPU
- {C0487169-8F81-497F-919E-EB42B1D0243F}.Release|AnyCPU.ActiveCfg = Release|Any CPU
- {C0487169-8F81-497F-919E-EB42B1D0243F}.Release|AnyCPU.Build.0 = Release|Any CPU
{4B9D96BB-95AB-44E8-9F87-13B12C8BCED1}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{4B9D96BB-95AB-44E8-9F87-13B12C8BCED1}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{4B9D96BB-95AB-44E8-9F87-13B12C8BCED1}.Release|AnyCPU.ActiveCfg = Release|Any CPU
@@ -417,8 +405,6 @@ Global
{7387E151-48E3-4885-B2CA-A74434A34045} = {864062D3-A415-4A6F-9324-5820237BA058}
{B8F799C5-D7CE-4E09-9CE6-BAA4173E7EC8} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
{5EB9E888-E357-417E-9F39-DDEC195CE47F} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
- {15945D4B-FF56-4BCC-B598-2718D199DD08} = {864062D3-A415-4A6F-9324-5820237BA058}
- {C0487169-8F81-497F-919E-EB42B1D0243F} = {864062D3-A415-4A6F-9324-5820237BA058}
{4B9D96BB-95AB-44E8-9F87-13B12C8BCED1} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
{8A6CB07C-E493-4A4F-AB94-038645A27118} = {E351F97D-EA4F-4E7F-AAA0-8EBB1F2A4A62}
{E0890301-F75F-40E7-B008-54C28B3BA542} = {864062D3-A415-4A6F-9324-5820237BA058}
diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml
index fcd7b759382..929488d5cac 100644
--- a/build-tools/automation/azure-pipelines.yaml
+++ b/build-tools/automation/azure-pipelines.yaml
@@ -278,7 +278,7 @@ stages:
inputs:
solution: Xamarin.Android.sln
configuration: $(XA.Build.Configuration)
- msbuildArguments: /t:Build /bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\msbuild-build.binlog
+ msbuildArguments: /restore /t:Build /bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\msbuild-build.binlog
- task: MSBuild@1
displayName: msbuild create-vsix
@@ -307,6 +307,7 @@ stages:
solution: Xamarin.Android.sln
configuration: $(XA.Build.Configuration)
msbuildArguments: >
+ /restore
/t:RunJavaInteropTests
/p:TestAssembly="bin\Test$(XA.Build.Configuration)\generator-Tests.dll;bin\Test$(XA.Build.Configuration)\Java.Interop.Tools.JavaCallableWrappers-Tests.dll;bin\Test$(XA.Build.Configuration)\logcat-parse-Tests.dll;bin\Test$(XA.Build.Configuration)\Xamarin.Android.Tools.ApiXmlAdjuster-Tests.dll;bin\Test$(XA.Build.Configuration)\Xamarin.Android.Tools.Bytecode-Tests.dll"
/bl:$(System.DefaultWorkingDirectory)\bin\Test$(XA.Build.Configuration)\msbuild-run-ji-tests.binlog
diff --git a/build-tools/automation/yaml-templates/apk-instrumentation.yaml b/build-tools/automation/yaml-templates/apk-instrumentation.yaml
index e87d8d82b7f..cf7c2ccc941 100644
--- a/build-tools/automation/yaml-templates/apk-instrumentation.yaml
+++ b/build-tools/automation/yaml-templates/apk-instrumentation.yaml
@@ -17,6 +17,7 @@ steps:
solution: ${{ parameters.project }}
configuration: ${{ parameters.configuration }}
msbuildArguments: >
+ /restore
/t:AcquireAndroidTarget,SignAndroidPackage,DeployTest${{ parameters.packageType }}s,RecordApkSizes,RunTestApks,UndeployTestApks,RenameApkTestCases,ReportComponentFailures
/bl:$(System.DefaultWorkingDirectory)/bin/Test${{ parameters.configuration }}/run${{ parameters.testName }}.binlog
${{ parameters.extraBuildArgs }}
diff --git a/build-tools/scripts/BuildEverything.mk b/build-tools/scripts/BuildEverything.mk
index 4b96b1fba68..88324820e72 100644
--- a/build-tools/scripts/BuildEverything.mk
+++ b/build-tools/scripts/BuildEverything.mk
@@ -26,7 +26,7 @@ endif
leeroy: leeroy-all framework-assemblies opentk-jcw
leeroy-all:
- $(call MSBUILD_BINLOG,leeroy-all,$(_SLN_BUILD)) $(SOLUTION) /p:Configuration=$(CONFIGURATION) $(_MSBUILD_ARGS)
+ $(call MSBUILD_BINLOG,leeroy-all,$(_SLN_BUILD)) /restore $(SOLUTION) /p:Configuration=$(CONFIGURATION) $(_MSBUILD_ARGS)
opentk-jcw:
$(foreach api_level, $(API_LEVELS), \
diff --git a/build-tools/scripts/Configuration.Java.Interop.Override.props b/build-tools/scripts/Configuration.Java.Interop.Override.props
index 069b2c16283..b0c4534a52c 100644
--- a/build-tools/scripts/Configuration.Java.Interop.Override.props
+++ b/build-tools/scripts/Configuration.Java.Interop.Override.props
@@ -3,6 +3,7 @@
$(MSBuildThisFileDirectory)..\..\external\mono\external\cecil
$(MSBuildThisFileDirectory)..\..\bin\$(Configuration)\lib\xamarin.android\xbuild\Xamarin\Android\
+ $(MSBuildThisFileDirectory)..\..\bin\$(Configuration)-netcoreapp3.1\
$(MSBuildThisFileDirectory)..\..\external\xamarin-android-tools
diff --git a/build-tools/scripts/RunTests.targets b/build-tools/scripts/RunTests.targets
index 2c296bf0adc..96ea76ae1ec 100644
--- a/build-tools/scripts/RunTests.targets
+++ b/build-tools/scripts/RunTests.targets
@@ -70,6 +70,12 @@
/>
+
GetCachedPath (ref testBinDir, () => Path.Combine (Configurables.Paths.BinDirRoot, $"Test{ctx.Configuration}"));
public static string BinDir => GetCachedPath (ref binDir, () => Path.Combine (Configurables.Paths.BinDirRoot, ctx.Configuration));
+ public static string NetCoreBinDir => GetCachedPath (ref binDir, () => Path.Combine (Configurables.Paths.BinDirRoot, $"{ctx.Configuration}-netcoreapp3.1"));
public static string BuildBinDir => GetCachedPath (ref buildBinDir, () => Path.Combine (Configurables.Paths.BinDirRoot, $"Build{ctx.Configuration}"));
public static string MingwBinDir => GetCachedPath (ref mingwBinDir, () => Path.Combine (ctx.Properties.GetRequiredValue (KnownProperties.AndroidMxeFullPath), "bin"));
public static string ProfileAssembliesProjitemsPath => GetCachedPath (ref profileAssembliesProjitemsPath, () => Path.Combine (BuildBinDir, "ProfileAssemblies.projitems"));
diff --git a/build-tools/xaprepare/xaprepare/Steps/Step_InstallMonoRuntimes.cs b/build-tools/xaprepare/xaprepare/Steps/Step_InstallMonoRuntimes.cs
index 45a919e81da..439b926aa5a 100644
--- a/build-tools/xaprepare/xaprepare/Steps/Step_InstallMonoRuntimes.cs
+++ b/build-tools/xaprepare/xaprepare/Steps/Step_InstallMonoRuntimes.cs
@@ -124,6 +124,9 @@ async Task ConjureXamarinCecilAndRemapRef (Context context, bool haveManag
return false;
}
+ Utilities.CreateDirectory (Configurables.Paths.NetCoreBinDir);
+ Utilities.CopyFile (assemblyPath, Path.Combine (Configurables.Paths.NetCoreBinDir, "Xamarin.Android.Cecil.dll"));
+
StatusStep (context, "Re-signing Xamarin.Android.Cecil.Mdb.dll");
assemblyPath = Path.Combine (Configurables.Paths.BuildBinDir, "Xamarin.Android.Cecil.Mdb.dll");
result = await sn.ReSign (snkPath, assemblyPath, $"sign-xamarin-android-cecil-mdb");
@@ -132,6 +135,8 @@ async Task ConjureXamarinCecilAndRemapRef (Context context, bool haveManag
return false;
}
+ Utilities.CopyFile (assemblyPath, Path.Combine (Configurables.Paths.NetCoreBinDir, "Xamarin.Android.Cecil.Mdb.dll"));
+
return true;
}
diff --git a/build-tools/xaprepare/xaprepare/ThirdPartyNotices/Java.Interop.cs b/build-tools/xaprepare/xaprepare/ThirdPartyNotices/Java.Interop.cs
index ca4bcd82c9e..f2517011dfb 100644
--- a/build-tools/xaprepare/xaprepare/ThirdPartyNotices/Java.Interop.cs
+++ b/build-tools/xaprepare/xaprepare/ThirdPartyNotices/Java.Interop.cs
@@ -12,7 +12,6 @@ class JavaInterop_External_Dependencies_Group : ThirdPartyNoticeGroup
public override List Notices => new List {
new JavaInterop_xamarin_Java_Interop_TPN (),
new JavaInterop_gityf_crc_TPN (),
- new JavaInterop_xamarin_mono_cecil_TPN (),
new JavaInterop_jbevain_mono_linq_expressions_TPN (),
new JavaInterop_mono_csharp_TPN (),
new JavaInterop_mono_LineEditor_TPN (),
@@ -71,17 +70,6 @@ POSSIBILITY OF SUCH DAMAGE.
}
// git submodules of Java.Interop
- class JavaInterop_xamarin_mono_cecil_TPN : ThirdPartyNotice
- {
- static readonly Uri url = new Uri ("https://github.com/mono/cecil/");
- static readonly string licenseFile = Path.Combine (Configurables.Paths.ExternalJavaInteropDir, "external", "cecil", "LICENSE.txt");
-
- public override string LicenseFile => licenseFile;
- public override string Name => "mono/cecil";
- public override Uri SourceUrl => url;
- public override string LicenseText => null;
- }
-
class JavaInterop_jbevain_mono_linq_expressions_TPN : ThirdPartyNotice
{
static readonly Uri url = new Uri ("https://github.com/jbevain/mono.linq.expressions/");
diff --git a/build-tools/xaprepare/xaprepare/ThirdPartyNotices/mono.cs b/build-tools/xaprepare/xaprepare/ThirdPartyNotices/mono.cs
index f12e5e988c7..d051139e28d 100644
--- a/build-tools/xaprepare/xaprepare/ThirdPartyNotices/mono.cs
+++ b/build-tools/xaprepare/xaprepare/ThirdPartyNotices/mono.cs
@@ -11,6 +11,7 @@ class mono_External_Dependencies_Group : ThirdPartyNoticeGroup
public override List Notices => new List {
new mono_mono_mono_TPN (),
+ new mono_mono_cecil_TPN (),
new mono_mono_boringssl_TPN (),
new mono_mono_ikdasm_TPN (),
new mono_mono_ikvm_fork_TPN (),
@@ -23,6 +24,17 @@ class mono_External_Dependencies_Group : ThirdPartyNoticeGroup
};
}
+ class mono_mono_cecil_TPN : ThirdPartyNotice
+ {
+ static readonly Uri url = new Uri ("https://github.com/mono/cecil/");
+ static readonly string licenseFile = Path.Combine (Configurables.Paths.MonoSdksTpnPath, "external", "cecil", "LICENSE.txt");
+
+ public override string LicenseFile => licenseFile;
+ public override string Name => "mono/cecil";
+ public override Uri SourceUrl => url;
+ public override string LicenseText => null;
+ }
+
class mono_mono_mono_TPN : ThirdPartyNotice
{
static readonly Uri url = new Uri ("https://github.com/mono/");
diff --git a/external/Java.Interop b/external/Java.Interop
index 1a086ffd514..56c92c70887 160000
--- a/external/Java.Interop
+++ b/external/Java.Interop
@@ -1 +1 @@
-Subproject commit 1a086ffd51436ec3bb78467a150e4f9121d57419
+Subproject commit 56c92c70887c58275917752450126c8c39988aa2