diff --git a/.gitmodules b/.gitmodules
index 9683f1ed73cf..0b7b44a0c49f 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -12,7 +12,7 @@
[submodule "external/mono"]
path = external/mono
url = ../../mono/mono.git
- branch = 2017-12
+ branch = 2018-02
[submodule "external/opentk"]
path = external/opentk
url = ../../mono/opentk.git
diff --git a/Make.config b/Make.config
index 2a73f75aaa4a..bd5cd0eb6b15 100644
--- a/Make.config
+++ b/Make.config
@@ -60,9 +60,9 @@ XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_9.3.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode93.app/Contents/Developer
# Minimum Mono version
-MIN_MONO_VERSION=5.10.0.0
-MAX_MONO_VERSION=5.10.99
-MIN_MONO_URL=https://xamjenkinsartifact.azureedge.net/build-package-osx-mono/2017-12/13/MonoFramework-MDK-5.10.0.15.macos10.xamarin.universal.pkg
+MIN_MONO_VERSION=5.12.0.122
+MAX_MONO_VERSION=5.12.99
+MIN_MONO_URL=https://xamjenkinsartifact.azureedge.net/build-package-osx-mono/2018-02/100/a6c7b9eca49859a04494380ff161acf24f37b3f0/MonoFramework-MDK-5.12.0.122.macos10.xamarin.universal.pkg
# Minimum Visual Studio version
MIN_VISUAL_STUDIO_URL=https://download.visualstudio.microsoft.com/download/pr/11550896/783d2219a348f93b6988fb415951788a/VisualStudioForMac-Preview-7.4.0.985.dmg
diff --git a/external/mono b/external/mono
index c6a8c0e38afa..9061f77e7f18 160000
--- a/external/mono
+++ b/external/mono
@@ -1 +1 @@
-Subproject commit c6a8c0e38afab1ef175598d3533c237e4fcca847
+Subproject commit 9061f77e7f181057ff27e6900c05d8b1e5c63773
diff --git a/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj b/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj
index 2d53532bff3c..61cf004b38d7 100644
--- a/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj
+++ b/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj
@@ -145,9 +145,9 @@
-
+
diff --git a/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj b/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj
index d56450e318ef..962b723cb94f 100644
--- a/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj
+++ b/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj
@@ -129,9 +129,9 @@
-
+
diff --git a/tests/bcl-test/AppDelegate.cs b/tests/bcl-test/AppDelegate.cs
index c279e4ecf97b..9f3840286ca1 100644
--- a/tests/bcl-test/AppDelegate.cs
+++ b/tests/bcl-test/AppDelegate.cs
@@ -48,7 +48,7 @@ public override bool FinishedLaunching (UIApplication app, NSDictionary options)
// create a new window instance based on the screen size
window = new UIWindow (UIScreen.MainScreen.Bounds);
runner = new TouchRunner (window);
- runner.Filter = new NotFilter (new CategoryExpression ("MobileNotWorking,NotOnMac,NotWorking,ValueAdd,CAS,InetAccess,NotWorkingInterpreter").Filter);
+ runner.Filter = new NotFilter (new CategoryExpression ("MobileNotWorking,NotOnMac,NotWorking,ValueAdd,CAS,InetAccess,NotWorkingLinqInterpreter").Filter);
// register every tests included in the main application/assembly
runner.Add (System.Reflection.Assembly.GetExecutingAssembly ());
diff --git a/tests/common/mac/MacTestMain.cs b/tests/common/mac/MacTestMain.cs
index d1e3b57a2e7d..7d5c7265e53d 100644
--- a/tests/common/mac/MacTestMain.cs
+++ b/tests/common/mac/MacTestMain.cs
@@ -45,7 +45,7 @@ static void RunTests (string [] original_args)
args.Add ($"-test={testName}");
#if ADD_BCL_EXCLUSIONS
- args.Add ("-exclude=MacNotWorking,MobileNotWorking,NotOnMac,NotWorking,ValueAdd,CAS,InetAccess,NotWorkingInterpreter");
+ args.Add ("-exclude=MacNotWorking,MobileNotWorking,NotOnMac,NotWorking,ValueAdd,CAS,InetAccess,NotWorkingLinqInterpreter");
#endif
// Skip arguments added by VSfM/macOS when running from the IDE
diff --git a/tests/linker/ios/link all/InterfacesTest.cs b/tests/linker/ios/link all/InterfacesTest.cs
index cb62d254711b..37490a73c262 100644
--- a/tests/linker/ios/link all/InterfacesTest.cs
+++ b/tests/linker/ios/link all/InterfacesTest.cs
@@ -64,6 +64,10 @@ public void CleanUpNativeData (IntPtr pNativeData)
[Preserve (AllMembers = true)]
public class InterfaceTest {
+ static Type type_a = typeof (A);
+ static Type type_b = typeof (B);
+ static Type type_i = typeof (I);
+
static void F (I i)
{
i.Bar ();
@@ -78,18 +82,18 @@ public void Bug10866 ()
F (new A ());
// Foo and Bar methods are both used on A and must be present
- Assert.NotNull (typeof(A).GetMethod ("Foo", BindingFlags.Instance | BindingFlags.Public), "A::Foo");
- Assert.NotNull (typeof(A).GetMethod ("Bar", BindingFlags.Instance | BindingFlags.Public), "A::Bar");
+ Assert.NotNull (type_a.GetMethod ("Foo", BindingFlags.Instance | BindingFlags.Public), "A::Foo");
+ Assert.NotNull (type_a.GetMethod ("Bar", BindingFlags.Instance | BindingFlags.Public), "A::Bar");
// I::Foo is never used and can be removed
- Assert.Null (typeof(I).GetMethod ("Foo", BindingFlags.Instance | BindingFlags.Public), "I::Foo");
+ Assert.Null (type_i.GetMethod ("Foo", BindingFlags.Instance | BindingFlags.Public), "I::Foo");
// I::Bar is used in F so everyone implementing I needs Bar
- Assert.NotNull (typeof(I).GetMethod ("Bar", BindingFlags.Instance | BindingFlags.Public), "I::Bar");
+ Assert.NotNull (type_i.GetMethod ("Bar", BindingFlags.Instance | BindingFlags.Public), "I::Bar");
// Foo and Bar are never used on B - so Foo can be removed
- Assert.Null (typeof(B).GetMethod ("Foo", BindingFlags.Instance | BindingFlags.Public), "B::Foo");
+ Assert.Null (type_b.GetMethod ("Foo", BindingFlags.Instance | BindingFlags.Public), "B::Foo");
// but Bar cannot since B implements I
- Assert.NotNull (typeof(B).GetMethod ("Bar", BindingFlags.Instance | BindingFlags.Public), "B::Bar");
+ Assert.NotNull (type_b.GetMethod ("Bar", BindingFlags.Instance | BindingFlags.Public), "B::Bar");
}
[DllImport ("/usr/lib/system/libsystem_dnssd.dylib")]
diff --git a/tests/linker/ios/link all/LinkAllTest.cs b/tests/linker/ios/link all/LinkAllTest.cs
index 2687694eb910..7e34a09521c6 100644
--- a/tests/linker/ios/link all/LinkAllTest.cs
+++ b/tests/linker/ios/link all/LinkAllTest.cs
@@ -40,7 +40,7 @@
namespace LinkAll {
// we DO NOT want the code to be "fully" available
- public partial class NotPreserved {
+ public class NotPreserved {
public byte One {
get; set;
@@ -85,6 +85,9 @@ public class LinkAllRegressionTest {
#error Unknown platform
#endif
+ Type not_preserved_type = typeof (NotPreserved);
+
+
class TypeAttribute : Attribute {
public TypeAttribute (Type type) {}
}
@@ -103,7 +106,8 @@ public void GetterOnly ()
// which means the property will be available for MEF_3862
NotPreserved np = new NotPreserved ();
Assert.That (np.Two, Is.EqualTo (0), "Two==0");
- PropertyInfo pi = typeof (NotPreserved).GetProperty ("Two");
+
+ PropertyInfo pi = not_preserved_type.GetProperty ("Two");
// check the *unused* setter absence from the application
Assert.NotNull (pi.GetGetMethod (), "getter");
Assert.Null (pi.GetSetMethod (), "setter");
@@ -115,7 +119,8 @@ public void SetterOnly ()
// that ensure the setter is not linked away,
NotPreserved np = new NotPreserved ();
np.One = 1;
- PropertyInfo pi = typeof (NotPreserved).GetProperty ("One");
+
+ PropertyInfo pi = not_preserved_type.GetProperty ("One");
// check the *unused* setter absence from the application
Assert.Null (pi.GetGetMethod (), "getter");
Assert.NotNull (pi.GetSetMethod (), "setter");
@@ -126,7 +131,7 @@ public void MEF_3862 ()
{
// note: avoiding using "typeof(DefaultValueAttribute)" in the code
// so the linker does not keep it just because of it
- PropertyInfo pi = typeof (NotPreserved).GetProperty ("Two");
+ PropertyInfo pi = not_preserved_type.GetProperty ("Two");
object [] attrs = pi.GetCustomAttributes (false);
bool default_value = false;
foreach (var ca in attrs) {
@@ -546,13 +551,14 @@ public void WebKit_NSProxy ()
Assert.Null (Type.GetType (fqn), fqn);
}
+ static Type type_Task = typeof (Task);
+
[Test]
public void Bug59015 ()
{
CheckAsyncTaskMethodBuilder (typeof (AsyncTaskMethodBuilder));
CheckAsyncTaskMethodBuilder (typeof (AsyncTaskMethodBuilder));
- var t = typeof (Task);
- var snfwc = t.GetMethod ("SetNotificationForWaitCompletion", BindingFlags.Instance | BindingFlags.NonPublic);
+ var snfwc = type_Task.GetMethod ("NotifyDebuggerOfWaitCompletion", BindingFlags.Instance | BindingFlags.NonPublic);
#if DEBUG
Assert.NotNull (snfwc, "Task.NotifyDebuggerOfWaitCompletion");
#else
diff --git a/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs b/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs
index e063810ac35c..3d75f7a0e767 100644
--- a/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs
+++ b/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs
@@ -1070,13 +1070,15 @@ public void SecurityDeclaration ()
}
#if !__WATCHOS__
+ static Type type_uibutton = typeof (UIButton);
+
[Test]
public void UIButtonSubclass ()
{
// ensure the linker keeps the .ctor(UIButtonType) around
using (var b = new UIButton (UIButtonType.Custom)) {
// https://trello.com/c/Nf2B8mIM/484-remove-debug-code-in-the-linker
- var m = typeof (UIButton).GetMethod ("VerifyIsUIButton", BindingFlags.Instance | BindingFlags.NonPublic);
+ var m = type_uibutton.GetMethod ("VerifyIsUIButton", BindingFlags.Instance | BindingFlags.NonPublic);
#if DEBUG
// kept in debug builds
Assert.NotNull (m, "VerifyIsUIButton");
diff --git a/tests/mmptest/regression/link-safe-1/LinkSafeAssembly.cs b/tests/mmptest/regression/link-safe-1/LinkSafeAssembly.cs
index 9bce63cb5594..ef12f040108f 100644
--- a/tests/mmptest/regression/link-safe-1/LinkSafeAssembly.cs
+++ b/tests/mmptest/regression/link-safe-1/LinkSafeAssembly.cs
@@ -26,16 +26,18 @@ public void UnusedMethod ()
{
}
+ static Type type_stla = typeof(SafeToLinkAssembly);
+
static void Main (string[] args)
{
NSApplication.Init ();
Test.EnsureLinker (true);
- int pcount = typeof (SafeToLinkAssembly).GetProperties (BindingFlags.NonPublic | BindingFlags.Static).Length;
+ int pcount = type_stla.GetProperties (BindingFlags.NonPublic | BindingFlags.Static).Length;
Test.Log.WriteLine ("{0}\tUnused property ({1}/0) was preserved by linker", pcount == 0 ? "[PASS]" : "[FAIL]", pcount);
- bool m = typeof (SafeToLinkAssembly).GetMethod ("UnusedMethod", BindingFlags.Public | BindingFlags.Instance) == null;
+ bool m = type_stla.GetMethod ("UnusedMethod", BindingFlags.Public | BindingFlags.Instance) == null;
Test.Log.WriteLine ("{0}\tUnused method was preserved by linker", m ? "[PASS]" : "[FAIL]");
Test.Terminate ();
diff --git a/tests/mmptest/src/CodeStrippingTests.cs b/tests/mmptest/src/CodeStrippingTests.cs
index 1ab8b64cf7e5..bcef6cd4db32 100644
--- a/tests/mmptest/src/CodeStrippingTests.cs
+++ b/tests/mmptest/src/CodeStrippingTests.cs
@@ -62,7 +62,8 @@ public void ShouldStripMonoPosixHelper (bool? strip, bool debugStrips, bool rele
MMPTests.RunMMPTest (tmpDir =>
{
TI.UnifiedTestConfig test = CreateStripTestConfig (strip, tmpDir);
-
+ // Mono's linker is smart enough to remove libMonoPosixHelper unless used (DeflateStream uses it)
+ test.TestCode = "using (var ms = new System.IO.MemoryStream ()) { using (var gz = new System.IO.Compression.DeflateStream (ms, System.IO.Compression.CompressionMode.Compress)) { }}";
StripTestCore (test, debugStrips, releaseStrips, "Contents/MonoBundle/libMonoPosixHelper.dylib", shouldWarn: false);
});
}
diff --git a/tests/templates/TodayExtension/TodayExtensionMain.cs b/tests/templates/TodayExtension/TodayExtensionMain.cs
index 9971adc5b961..04c48fc72dae 100644
--- a/tests/templates/TodayExtension/TodayExtensionMain.cs
+++ b/tests/templates/TodayExtension/TodayExtensionMain.cs
@@ -21,7 +21,7 @@ public void WidgetPerformUpdate (Action completionHandler)
{
runner = new ConsoleRunner ();
runner.Add (System.Reflection.Assembly.GetExecutingAssembly ());
- runner.Filter = new NotFilter (new CategoryExpression ("MobileNotWorking,NotOnMac,NotWorking,ValueAdd,CAS,InetAccess,NotWorkingInterpreter").Filter);
+ runner.Filter = new NotFilter (new CategoryExpression ("MobileNotWorking,NotOnMac,NotWorking,ValueAdd,CAS,InetAccess,NotWorkingLinqInterpreter").Filter);
System.Threading.ThreadPool.QueueUserWorkItem ((v) =>
{
runner.LoadSync ();
diff --git a/tests/templates/TodayExtension/TodayExtensionMain.fs b/tests/templates/TodayExtension/TodayExtensionMain.fs
index 470aebc895cc..4cb14f600c90 100644
--- a/tests/templates/TodayExtension/TodayExtensionMain.fs
+++ b/tests/templates/TodayExtension/TodayExtensionMain.fs
@@ -21,7 +21,7 @@ type TodayViewController() =
[]
member this.WidgetPerformUpdate (completionHandler: Action) =
runner <- new ConsoleRunner ()
- let ce = new CategoryExpression ("MobileNotWorking,NotOnMac,NotWorking,ValueAdd,CAS,InetAccess,NotWorkingInterpreter")
+ let ce = new CategoryExpression ("MobileNotWorking,NotOnMac,NotWorking,ValueAdd,CAS,InetAccess,NotWorkingLinqInterpreter")
runner.Filter <- new NotFilter (ce.Filter)
let tp = this.GetType ()
runner.Add (tp.Assembly)
diff --git a/tests/templates/WatchExtension/InterfaceController.cs b/tests/templates/WatchExtension/InterfaceController.cs
index e2611c0591c3..fef9d2440971 100644
--- a/tests/templates/WatchExtension/InterfaceController.cs
+++ b/tests/templates/WatchExtension/InterfaceController.cs
@@ -71,7 +71,7 @@ public override void Awake (NSObject context)
void LoadTests ()
{
runner = new WatchOSRunner ();
- var categoryFilter = new NotFilter (new CategoryExpression ("MobileNotWorking,NotOnMac,NotWorking,ValueAdd,CAS,InetAccess,NotWorkingInterpreter,RequiresBSDSockets").Filter);
+ var categoryFilter = new NotFilter (new CategoryExpression ("MobileNotWorking,NotOnMac,NotWorking,ValueAdd,CAS,InetAccess,NotWorkingLinqInterpreter,RequiresBSDSockets").Filter);
if (!string.IsNullOrEmpty (Environment.GetEnvironmentVariable ("NUNIT_FILTER_START"))) {
var firstChar = Environment.GetEnvironmentVariable ("NUNIT_FILTER_START") [0];
var lastChar = Environment.GetEnvironmentVariable ("NUNIT_FILTER_END") [0];
diff --git a/tests/templates/WatchExtension/InterfaceController.fs b/tests/templates/WatchExtension/InterfaceController.fs
index e12b59848aeb..663d2a204401 100644
--- a/tests/templates/WatchExtension/InterfaceController.fs
+++ b/tests/templates/WatchExtension/InterfaceController.fs
@@ -35,7 +35,7 @@ type InterfaceController (handle: IntPtr) =
member this.LoadTests () =
runner <- new WatchOSRunner ()
- let ce = new CategoryExpression ("MobileNotWorking,NotOnMac,NotWorking,ValueAdd,CAS,InetAccess,NotWorkingInterpreter")
+ let ce = new CategoryExpression ("MobileNotWorking,NotOnMac,NotWorking,ValueAdd,CAS,InetAccess,NotWorkingLinqInterpreter")
runner.Filter <- new NotFilter (ce.Filter)
let tp = this.GetType ()
runner.Add (tp.Assembly)
diff --git a/tools/linker/MobileProfile.cs b/tools/linker/MobileProfile.cs
index d314c6a73cd6..d16616930a94 100644
--- a/tools/linker/MobileProfile.cs
+++ b/tools/linker/MobileProfile.cs
@@ -94,6 +94,7 @@ public abstract class MobileProfile : BaseProfile {
"System.Memory",
"System.Net.AuthenticationManager",
"System.Net.Cache",
+ "System.Net.Http.Rtc",
"System.Net.HttpListener",
"System.Net.Mail",
"System.Net.NameResolution",
@@ -117,8 +118,10 @@ public abstract class MobileProfile : BaseProfile {
"System.Reflection.Primitives",
"System.Reflection.TypeExtensions",
"System.Reflection",
+ "System.Resources.Reader",
"System.Resources.ReaderWriter",
"System.Resources.ResourceManager",
+ "System.Resources.Writer",
"System.Runtime.CompilerServices.VisualC",
"System.Runtime.Extensions",
"System.Runtime.Handles",