Visual Studio 2022 "Add Service Reference" uses Newtonsoft Json.NET instead of System.Text.Json

Viewed 174

I have a ASP.NET 6 Web API, using System.Text.Json for Json serialization.

If I use the feature "Add Service Reference" of Visual Studio 2022, the C# generated code still uses Newtonson Json.NET library for Json serialization.

enter image description here

As a result, some API calls fail complaining about wrong serialization.

Is there a way to have Visual Studio generate code that uses Sysem.Text.Json instead of Newtonsoft?

0 Answers
Related