ServiceStack.Mvc
public class QyController : ServiceStackController<CustomUserSession>
{
public async Task<IActionResult> Generate(int year)
{
return Json(new { message = "********", success = 0 });
}
}
It will generate error,
错误 CS7069 对类型“JsonResult”的引用声称该类型是在“Microsoft.AspNetCore.Mvc.Formatters.Json”中定义的,But Not Found.
ServiceStack.Mvc depends on .net core 2.2, and depends on microsoft.aspnetcore.mvc.formatters.json packages too , But in .net core 3.0, It didn’t have
microsoft.aspnetcore.mvc.formatters.json , how to solve it ?