diff --git a/.gitmodules b/.gitmodules
index ac507adcd40..94d4afb6c0f 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -5,7 +5,7 @@
[submodule "external/mono"]
path = external/mono
url = https://github.com/mono/mono.git
- branch = 2017-10
+ branch = 2017-12
[submodule "external/mxe"]
path = external/mxe
url = https://github.com/xamarin/mxe.git
diff --git a/Configuration.props b/Configuration.props
index 64ff9cad573..9482200789b 100644
--- a/Configuration.props
+++ b/Configuration.props
@@ -54,8 +54,8 @@
$(MSBuildThisFileDirectory)external\Java.Interop
$(MSBuildThisFileDirectory)external\llvm
$(MSBuildThisFileDirectory)external\mono
- 5.8.0
- 5.9.0
+ 5.10.0
+ 5.11.0
True
$(MonoRequiredMinimumVersion).22
$(MSBuildThisFileDirectory)external\mono\external\linker
diff --git a/build-tools/dependencies/dependencies.projitems b/build-tools/dependencies/dependencies.projitems
index a75e37dbb07..a3046d44919 100644
--- a/build-tools/dependencies/dependencies.projitems
+++ b/build-tools/dependencies/dependencies.projitems
@@ -1,7 +1,7 @@
- <_DarwinMonoFramework>MonoFramework-MDK-5.8.0.22.macos10.xamarin.universal.pkg
+ <_DarwinMonoFramework>MonoFramework-MDK-5.10.0.47.macos10.xamarin.universal.pkg
<_AptGetInstall>apt-get -f -u install
@@ -59,7 +59,7 @@
$(MonoRequiredMaximumVersion)
$(MonoRequiredDarwinMinimumVersion)
$(MSBuildThisFileDirectory)..\scripts\mono-version
- https://bosstoragemirror.azureedge.net/wrench/mono-2017-10/7e/7e85cfa5d228cd5148e59cde1d4d663457f96966/$(_DarwinMonoFramework)
+ https://xamjenkinsartifact.azureedge.net/build-package-osx-mono/2017-12/41/$(_DarwinMonoFramework)
installer -pkg "$(AndroidToolchainCacheDirectory)\$(_DarwinMonoFramework)" -target /
diff --git a/build-tools/mono-runtimes/ProfileAssemblies.projitems b/build-tools/mono-runtimes/ProfileAssemblies.projitems
index 1b7740d47e5..957cbf6b368 100644
--- a/build-tools/mono-runtimes/ProfileAssemblies.projitems
+++ b/build-tools/mono-runtimes/ProfileAssemblies.projitems
@@ -260,8 +260,11 @@
System.Xml.Linq
-
- lib/monodroid
+
+
+ System.Runtime.CompilerServices.Unsafe
+ reference
+
diff --git a/build-tools/mono-runtimes/mono-runtimes.targets b/build-tools/mono-runtimes/mono-runtimes.targets
index 844abd72bea..fcc85be4a08 100644
--- a/build-tools/mono-runtimes/mono-runtimes.targets
+++ b/build-tools/mono-runtimes/mono-runtimes.targets
@@ -57,10 +57,10 @@
<_BclAssembly Include="@(MonoProfileAssembly)" />
<_BclExcludeDebugSymbols Include="System.Windows.dll" />
<_BclExcludeDebugSymbols Include="System.Xml.Serialization.dll" />
- <_BclTestAssemblySource Include="@(MonoTestAssembly->'$(MonoSourceFullPath)\mcs\class\%(SourcePath)\%(Identity)')" />
- <_BclTestAssemblySource Include="@(MonoTestAssembly->'$(MonoSourceFullPath)\mcs\class\%(SourcePath)\%(Filename).pdb')" />
<_BclTestAssemblyDestination Include="@(MonoTestAssembly->'$(XAInstallPrefix)\..\..\bcl-tests\%(Identity)')" />
<_BclTestAssemblyDestination Include="@(MonoTestAssembly->'$(XAInstallPrefix)\..\..\bcl-tests\%(Filename).pdb')" />
+ <_BclTestAssemblyDestination Include="@(MonoTestRunner->'$(XAInstallPrefix)\..\..\bcl-tests\%(Identity)')" />
+ <_BclTestAssemblyDestination Include="@(MonoTestRunner->'$(XAInstallPrefix)\..\..\bcl-tests\%(Filename).pdb')" />
<_BclTestOutput Include="@(_BclTestAssemblyDestination)" />
@@ -335,12 +335,26 @@
Command="make -C $(MonoSourceFullPath)\mcs\class\%(MonoTestAssembly.SourcePath) xunit-test-local"
WorkingDirectory="$(MonoSourceFullPath)"
/>
+
+
+ <_BclTestAssemblyReference Include="@(MonoTestAssembly)" Condition="'%(MonoTestAssembly.TestType)' == 'reference'" />
+ <_BclTestAssemblyXUnit Include="@(MonoTestAssembly)" Condition="'%(MonoTestAssembly.TestType)' == 'xunit'" />
+ <_BclTestAssemblyNUnit Include="@(MonoTestAssembly)" Condition="'%(MonoTestAssembly.TestType)' == ''" />
+ <_BclTestAssemblySource Include="@(_BclTestAssemblyReference->'$(MonoSourceFullPath)\mcs\class\lib\monodroid\%(Identity)')" />
+ <_BclTestAssemblySource Include="@(_BclTestAssemblyReference->'$(MonoSourceFullPath)\mcs\class\lib\monodroid\%(Filename).pdb')" Condition="Exists('@(_BclTestAssemblyReference->'$(MonoSourceFullPath)\mcs\class\lib\monodroid\%(Filename).pdb')')" />
+ <_BclTestAssemblySource Include="@(_BclTestAssemblyXUnit->'$(MonoSourceFullPath)\mcs\class\%(SourcePath)\%(Identity)')" />
+ <_BclTestAssemblySource Include="@(_BclTestAssemblyXUnit->'$(MonoSourceFullPath)\mcs\class\%(SourcePath)\%(Filename).pdb')" />
+ <_BclTestAssemblySource Include="@(_BclTestAssemblyNUnit->'$(MonoSourceFullPath)\mcs\class\lib\monodroid\tests\%(Identity)')" />
+ <_BclTestAssemblySource Include="@(_BclTestAssemblyNUnit->'$(MonoSourceFullPath)\mcs\class\lib\monodroid\tests\%(Filename).pdb')" />
+ <_BclTestAssemblySource Include="@(MonoTestRunner->'$(MonoSourceFullPath)\mcs\class\lib\monodroid\%(Identity)')" />
+ <_BclTestAssemblySource Include="@(MonoTestRunner->'$(MonoSourceFullPath)\mcs\class\lib\monodroid\%(Filename).pdb')" />
+
<_BclTestContent Include="$(MonoSourceFullPath)\mcs\class\%(MonoTestAssembly.SourcePath)\Test\**\*.*" />
diff --git a/external/mono b/external/mono
index 3c3e692887a..a0af42ab186 160000
--- a/external/mono
+++ b/external/mono
@@ -1 +1 @@
-Subproject commit 3c3e692887af323549aca938dd6d3dca7a9a6cc8
+Subproject commit a0af42ab186cf997eb7abd8647b4fdc359bcde96
diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj
index 6c60361d00f..67b8a26564e 100644
--- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj
+++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj
@@ -272,99 +272,105 @@
-
+
Linker\Mono.Linker\Annotations.cs
-
+
Linker\Mono.Linker\AssemblyAction.cs
-
+
Linker\Mono.Linker\AssemblyResolver.cs
-
+
Linker\Mono.Linker\I18nAssemblies.cs
-
+
Linker\Mono.Linker\IXApiVisitor.cs
-
+
Linker\Mono.Linker\LinkContext.cs
-
+
Linker\Mono.Linker\MethodAction.cs
-
+
Linker\Mono.Linker\MethodReferenceExtensions.cs
-
+
Linker\Mono.Linker\Pipeline.cs
-
+
Linker\Mono.Linker\TypePreserve.cs
-
+
Linker\Mono.Linker\TypeReferenceExtensions.cs
-
+
Linker\Mono.Linker\XApiReader.cs
-
+
Linker\Mono.Linker.Steps\BlacklistStep.cs
-
+
Linker\Mono.Linker.Steps\BaseStep.cs
-
+
Linker\Mono.Linker.Steps\CleanStep.cs
-
+
Linker\Mono.Linker.Steps\IStep.cs
-
+
Linker\Mono.Linker.Steps\LoadI18nAssemblies.cs
-
+
Linker\Mono.Linker.Steps\LoadReferencesStep.cs
-
+
Linker\Mono.Linker.Steps\OutputStep.cs
-
+
Linker\Mono.Linker.Steps\RegenerateGuidStep.cs
-
+
Linker\Mono.Linker.Steps\ResolveFromAssemblyStep.cs
-
+
Linker\Mono.Linker.Steps\ResolveFromXApiStep.cs
-
+
Linker\Mono.Linker.Steps\ResolveFromXmlStep.cs
-
+
Linker\Mono.Linker.Steps\ResolveStep.cs
-
+
Linker\Mono.Linker.Steps\TypeMapStep.cs
-
+
Linker\Mono.Linker.Steps\SweepStep.cs
-
+
Linker\Mono.Linker.Steps\MarkStep.cs
-
+
Linker\Mono.Linker\LoadException.cs
-
+
Linker\Mono.Linker\MarkException.cs
-
+
Linker\Mono.Linker\ConsoleLogger.cs
-
+
Linker\Mono.Linker\ILogger.cs
+
+ Linker\Mono.Linker\MarkingHelpers.cs
+
+
+ Linker\Mono.Linker\Tracer.cs
+
diff --git a/tests/BCL-Tests/Xamarin.Android.Bcl-Tests/Xamarin.Android.Bcl-Tests.targets b/tests/BCL-Tests/Xamarin.Android.Bcl-Tests/Xamarin.Android.Bcl-Tests.targets
index 3bc40818051..1b2115baaaf 100644
--- a/tests/BCL-Tests/Xamarin.Android.Bcl-Tests/Xamarin.Android.Bcl-Tests.targets
+++ b/tests/BCL-Tests/Xamarin.Android.Bcl-Tests/Xamarin.Android.Bcl-Tests.targets
@@ -28,8 +28,14 @@
+
+ <_DebugSymbol
+ Include="..\..\..\bin\$(Configuration)\bcl-tests\%(MonoTestAssembly.Filename).pdb"
+ Condition="Exists('..\..\..\bin\$(Configuration)\bcl-tests\%(MonoTestAssembly.Filename).pdb')"
+ />
+