In #104104 I've tried to re-enable all BF tests and got following error for WASM/Mobile builds:
[00:49:29] info: [FAIL] System.Formats.Nrbf.Tests.ArraySinglePrimitiveRecordTests.CanReadArrayOfAnySize_Bool(size: 127, canSeek: False)
[00:49:29] info: System.TypeInitializationException : The type initializer for 'System.Runtime.Serialization.Formatters.Binary.Converter' threw an exception.
[00:49:29] info: ---- System.IO.FileNotFoundException :
[00:49:29] info: at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.GetAssemblyId(WriteObjectInfo )
[00:49:29] info: at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object , BinaryFormatterWriter )
[00:49:29] info: at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream , Object )
[00:49:29] info: at System.Formats.Nrbf.Tests.ReadTests.Serialize[Boolean[]](Boolean[] instance)
[00:49:29] info: at System.Formats.Nrbf.Tests.ArraySinglePrimitiveRecordTests.Test[Boolean](Int32 size, Boolean canSeek)
[00:49:29] info: at System.Object.InvokeStub_ArraySinglePrimitiveRecordTests.CanReadArrayOfAnySize_Bool(Object , Span`1 )
Most likely it's trying to load "mscorlib" which is not available for these platforms:
|
internal static readonly Assembly s_urtAssembly = Assembly.Load("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
Prior to #103255 BF would simply throw PNSE for them:
|
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppCurrent)-browser;$(NetCoreAppCurrent)-ios;$(NetCoreAppCurrent)-tvos;$(NetCoreAppCurrent)-android</TargetFrameworks> |
|
<ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''"> |
|
<Compile Include="System\Runtime\Serialization\Formatters\Binary\BinaryFormatter.PlatformNotSupported.cs" /> |
|
</ItemGroup> |
@bartonjs should we change the OOB package to keep throwing PNSE for WASM/Mobile?
In #104104 I've tried to re-enable all BF tests and got following error for WASM/Mobile builds:
Most likely it's trying to load "mscorlib" which is not available for these platforms:
runtime/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/Converter.cs
Line 38 in d6f4bee
Prior to #103255 BF would simply throw
PNSEfor them:runtime/src/libraries/System.Runtime.Serialization.Formatters/src/System.Runtime.Serialization.Formatters.csproj
Line 3 in a82225e
runtime/src/libraries/System.Runtime.Serialization.Formatters/src/System.Runtime.Serialization.Formatters.csproj
Lines 77 to 79 in a82225e
@bartonjs should we change the OOB package to keep throwing PNSE for WASM/Mobile?