Skip to content

wasm AOT library test failure - System.Runtime.Serialization.InvalidDataContractException NoSetMethodForProperty #46757

@mdh1418

Description

@mdh1418

In effort to run library tests with AOT compilation on CI #46633, there are a number of failures arising from #46651.

Test suite System.Runtime.Serialization.Json.ReflectionOnly.Tests.csproj fails with

System.Runtime.Serialization.InvalidDataContractException : NoSetMethodForProperty

System.NotImplementedException : Arg_NotImplementedException

SRSJR_fail.txt

Repro:
Check out changes in #46651
./build.sh -os Browser -arch wasm -c Release
Remove

<!-- Temporary until https://github.com/mono/linker/issues/1713 is resolved -->
<assembly fullname="Microsoft.DotNet.RemoteExecutor">
<type fullname="Microsoft.DotNet.RemoteExecutor.Program">
<method signature="System.Int32 Main(System.String[])" />
</type>
</assembly>

Modify
catch (Exception e) when (IsIoRelatedException(e) && !disposing)
to be an empty catch

catch
{
}

./dotnet.sh build /t:Test /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:EnableAggressiveTrimming=true /p:RunAOTCompilation=true src/libraries/System.Runtime.Serialization.Json/tests/ReflectionOnly/System.Runtime.Serialization.Json.ReflectionOnly.Tests.csproj

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions