.net-core-3.0

.NET Core 3 preview 4: 'AddNewtonsoftJson' is not defined

五迷三道 提交于 2020-08-19 05:57:12
问题 Using .NET Core 3 preview 4, the "API" template for a F# ASP.NET MVC project fails to build. This is without any changes to the template whatsoever. This is the code that fails: type Startup private () = member this.ConfigureServices(services: IServiceCollection) = // Add framework services. services.AddControllers().AddNewtonsoftJson() |> ignore With error ...\Startup.fs(23,35): error FS0039: The field, constructor or member 'AddNewtonsoftJson' is not defined. Maybe you want one of the