📜  asp.net 核心标识脚手架错误 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:59.045000             🧑  作者: Mango

代码示例1
Workaround by stackoverflow user: Pritom Sarkar
1.Close Visual Studio.
2.Open a command prompt and change directories to the project location.
3.Make sure the aspnet-codegenerator tool is installed on your machine:

    dotnet tool install -g dotnet-aspnet-codegenerator

4.Add Microsoft.VisualStudio.Web.CodeGeneration.Design package to the project:
    Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Design

5.Finally download all the identity pages
dotnet aspnet-codegenerator identity -dc YourNamespaceName.YourDbContextName


dotnet aspnet-codegenerator also has the ability to scaffold only specific files:
    dotnet aspnet-codegenerator identity -dc MyApp.Models.ApplicationDbContext –files “Account.Register;Account.Login;Account.Logout”