In Blazor Hosted template, use Json.NET. Fixes #7122
This commit is contained in:
parent
7bd5297cfa
commit
a5915edada
|
|
@ -12,6 +12,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Blazor.Server" Version="$(TemplateBlazorPackageVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Server" Version="$(TemplateComponentsPackageVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="$(TemplateComponentsPackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace BlazorHosted_CSharp.Server
|
|||
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddMvc();
|
||||
services.AddMvc().AddNewtonsoftJson();
|
||||
services.AddResponseCompression();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue