This can only be merged in after #49854 fixing the bug is merged in.
Thanks
Tomas
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+class Program
+{
+ static int Main()
+ {
+ JsonSerializerOptions options = new JsonSerializerOptions();
+ JsonConverter converter = options.GetConverter(typeof(DateTime));
+ Console.WriteLine("Converter type: {0}", converter.GetType());
+ return converter != null ? 100 : 1;
+ }
+}
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ <Nullable>enable</Nullable>
+ <LangVersion>9.0</LangVersion>
+
+ <!-- This is an explicit crossgen test -->
+ <AlwaysUseCrossGen2>true</AlwaysUseCrossGen2>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="*.cs" />
+ </ItemGroup>
+</Project>