NetSparkleUpdater/NetSparkle

System.Text.Json does not need to be included all the time

Deadpikle opened this issue · 0 comments

The System.Text.Json library is included in the runtime for .NET Core 3.1 and later versions. - https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/migrate-from-newtonsoft?pivots=dotnet-9-0

Source generation in System.Text.Json is available in .NET 6 and later versions https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/source-generation?pivots=dotnet-8-0 -- and c# 9 is needed, but this is supported as of .NET 5, which is currently our minimum supported version.

Remove this explicit dependency to reduce the file size by a good chunk for .NET 6/7/8. Keep for netstandard2.0 and .net 4.6.2. Don't forget to test.