You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works fine for me with .NET 6.0 RTM and the latest ilc package (7.0.0-alpha.1.21559.1).
It it does not work for you, please share the ilc package version that you are using and the build log.
Also, you may want to make sure to clean you obj and bin directories. The incremental builds do not always work correctly when .NET SDK version is updated.
dotnet 6.0.100-preview.7
NativeAOT 7.0.0-alpha.1.21431.2
due the compilation stage it pops warning about missing method and then after running the published binary it throws:
Unhandled Exception: System.MissingMethodException: Method not found: 'System.Text.Json.Serialization.Metadata.JsonTypeInfo
$(String[]) + 0x2f1<!!0> System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo(System.Text.Json.JsonSerializerOptions, System.Func
1<!!0>, System.Func2<System.Text.Json.Serialization.JsonSerializerContext, System.Text.Json.Serialization.Metadata.JsonPropertyInfo[]>, System.Text.Json.Serialization.JsonNumberHandling, System.Action
2<System.Text.Json.Utf8JsonWriter, !!0>)'.at Internal.Runtime.TypeLoaderExceptionHelper.CreateMissingMethodException(ExceptionStringID, String) + 0x47
at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowMissingMethodException(ExceptionStringID, String) + 0x6
at NAOTJsonMissingMethod.SampleJsonContext.get_Sample() + 0x12
at $.
at NAOTJsonMissingMethod!+0x200305
The text was updated successfully, but these errors were encountered: