Skip to content

why Newtonsoft.Json too big when build native aot #88601

Answered by hez2010
NCLnclNCL asked this question in General
Discussion options

You must be logged in to vote

Newtonsoft.Json doesn't have NativeAOT support at all, so it instead rooting the whole assembly regardless of whether a type will be used or not.
While System.Text.Json has the support if you are using source generator, so only the necessary part of code will be kept in the binary.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by eiriktsarpalis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Text.Json untriaged New issue has not been triaged by the area owner
2 participants
Converted from issue

This discussion was converted from issue #88600 on July 10, 2023 13:34.