清理 ,重新生成 ,然后 加入 以下 nuget 。就可以了 Microsoft.VisualStudio.Web.CodeGeneration.Design Microsoft.EntityFrameworkCore.Tools