Skip to content

System.Runtime.Serialization.Formatters.Tests.FormatterServicesTests.GetUninitializedObject_COMObject_ThrowsNotSupportedException fails with Mono #39704

@ViktorHofer

Description

@ViktorHofer

Configuration: net5.0-Windows_NT-Debug-x64-Mono_release-Windows.10.Amd64.Server19H1.ES.Open

The test wasn't running before because it was excluded via TargetsWindows even though the test project is runtime agnostic.

<Compile Include="FormatterServicesTests.Windows.cs" Condition="'$(TargetsWindows)' == 'true'" />

This was fixed with #35606 and started failing for Mono.

System.Runtime.Serialization.Formatters.Tests.FormatterServicesTests.GetUninitializedObject_COMObject_ThrowsNotSupportedException [FAIL]
        Assert.True() Failure
        Expected: True
        Actual:   False
        Stack Trace:
          C:\git\runtime4\src\libraries\System.Runtime.Serialization.Formatters\tests\FormatterServicesTests.Windows.cs(17,0): at System.Runtime.Serialization.Formatters.Tests.FormatterServicesTests.GetUninitializedObject_COMObject_ThrowsNotSupportedException()
          C:\git\runtime4\src\mono\netcore\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs(384,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

cc @akoeplinger @lateralusX

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions