#13641·mono

monotouch NUnit and Xunit test dlls have failures on devices/simulators

Author: mandel-macaqueCreated Mar 25, 2019Updated Feb 9, 2026
Labelsarea-SDK: Packaging

As part of the process of consuming the test dlls from the SDK we have started running the tests on devices. The monotouch_corlib_test.dll and others contains tests that fail on device because they are linked away.

We should do a pass through all the ignore files.

Steps to Reproduce

  1. Execute the nunit tests on a device (make runner on xamarin-macion will help with this).

Current Behavior

Example from monotouch_corlib_test.dll:

The following tests fail with System.NotSupportedException : Linked Away

MonoTests.System.Runtime.Remoting.Channels.ChannelServicesTest.ConstructorEnsureSecurity
MonoTests.System.Runtime.Remoting.Channels.ChannelServicesTest.ConstructorEnsureSecurity2
MonoTests.System.Runtime.Remoting.Contexts.SynchronizationAttributeTest.Constructor_Bool
MonoTests.System.Runtime.Remoting.Contexts.SynchronizationAttributeTest.Constructor_Default
MonoTests.System.Runtime.Remoting.Contexts.SynchronizationAttributeTest.Constructor_Int
MonoTests.System.Runtime.Remoting.Contexts.SynchronizationAttributeTest.Constructor_IntBool
MonoTests.System.Runtime.Remoting.Contexts.SynchronizationAttributeTest.DeserializeKnownValue
MonoTests.System.Runtime.Remoting.Contexts.SynchronizationAttributeTest.SerializationRoundtrip
MonoTests.System.Runtime.Remoting.Contexts.SynchronizationAttributeTest.SetLocked
MonoTests.System.Runtime.Remoting.Messaging.CallContextTest.CallContextPropagation_Not_ThreadPool
MonoTests.System.Runtime.Remoting.Messaging.CallContextTest.CallContextPropagation_Task
MonoTests.System.Runtime.Remoting.Messaging.CallContextTest.CallContextPropagation_TaskContinuation
MonoTests.System.Runtime.Remoting.Messaging.CallContextTest.CallContextPropagation_Thread
MonoTests.System.Runtime.Remoting.Messaging.CallContextTest.CallContextPropagation_ThreadPool
MonoTests.System.Runtime.Remoting.Messaging.CallContextTest.FreeNamedDataSlot_ShouldClearBothLogicalAndIllogicalData
MonoTests.System.Runtime.Remoting.Messaging.CallContextTest.FreeNamedDataSlot_ShouldClearIllogicalData
MonoTests.System.Runtime.Remoting.Messaging.CallContextTest.FreeNamedDataSlot_ShouldClearLogicalData
MonoTests.System.Runtime.Remoting.Metadata.W3cXsd2001.SoapHexBinaryTest.Parse_Value_Invalid

Other examples: https://github.com/xamarin/xamarin-macios/pull/5858.

Expected Behavior

Either tests are added to an ignore category or they are marked so that they are not remove by the linker.

On which platforms did you notice this

[X] iOS [X] macOS [ ] Linux [ ] Windows