.NET Core 3 preview 4: ‘AddNewtonsoftJson’ is not defined

In order to switch ASP.NET Core 3.0 back to use JSON.NET, you will need to reference the Microsoft.AspNetCore.Mvc.NewtonsoftJson NuGet package. That will contain the AddNewtonsoftJson extension method.

In C#, this would look like this:

services.AddControllers()
    .AddNewtonsoftJson();

So assuming that I understand enough of F#, I would say that your call would be correct if you have the package referenced in your project.

Leave a Comment