-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Description
Failures look like:
Running assembly:System.Net.Http.Json.Unit.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
[FAIL] System.Net.Http.Json.Functional.Tests.TranscodingWriteStreamTest.WriteAsync_Works_WhenOutputIs_WesternEuropeanEncoding(message: "Hello world")
System.NotSupportedException : JsonTypeInfo metadata for type 'System.Net.Http.Json.Functional.Tests.TranscodingWriteStreamTest+TestModel' was not provided by TypeInfoResolver of type '[]'. If using source generation, ensure that all root types passed to the serializer have been annotated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically.
at System.Text.Json.ThrowHelper.ThrowNotSupportedException_NoMetadataForType(Type, IJsonTypeInfoResolver) + 0x78
at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type, Boolean, Nullable`1, Boolean, Boolean) + 0xdc
at System.Text.Json.JsonSerializerOptions.GetTypeInfoForRootType(Type, Boolean) + 0x68
at System.Net.Http.Json.Functional.Tests.TranscodingWriteStreamTest.<WriteAsyncTest>d__8.MoveNext() + 0x150
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x24
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xfc
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x68
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x24
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xfc
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x68
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x24
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xfc
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x68
[FAIL] System.Net.Http.Json.Functional.Tests.TranscodingWriteStreamTest.WriteAsync_Works_WhenOutputIs_WesternEuropeanEncoding(message: "ABABABABABABABABABABABABABABABABABABABABABABABABAB"...)
System.NotSupportedException : JsonTypeInfo metadata for type 'System.Net.Http.Json.Functional.Tests.TranscodingWriteStreamTest+TestModel' was not provided by TypeInfoResolver of type '[]'. If using source generation, ensure that all root types passed to the serializer have been annotated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically.
at System.Text.Json.ThrowHelper.ThrowNotSupportedException_NoMetadataForType(Type, IJsonTypeInfoResolver) + 0x78
at System.Text.Json.JsonSerializerOptions.GetTypeInfoInternal(Type, Boolean, Nullable`1, Boolean, Boolean) + 0xdc
at System.Text.Json.JsonSerializerOptions.GetTypeInfoForRootType(Type, Boolean) + 0x68
at System.Net.Http.Json.Functional.Tests.TranscodingWriteStreamTest.<WriteAsyncTest>d__8.MoveNext() + 0x150
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x24
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xfc
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x68
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x24
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xfc
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x68
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x24
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xfc
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x68
Steps to repro:
build.cmd -s clr.aot+libs -rc checked -c Release
cd src\libraries\System.Net.Http.Json\tests\UnitTests
..\..\..\..\..\dotnet.cmd build /t:Test -c Release /p:TestNativeAot=true /p:CoreCLRConfiguration=checked