Search code examples
c#asp.net-corescaffolding

ASP.NET Core not create a view


I encounter this error when creating a view in the asp.net core project, what is the reason?

there was an error running the selected code generator : 'scaffolding failed' could not load information for project E:\my projects\ ... \ DataLayer.csproj

and i tried different Microsoft.VisualStudio.Web.CodeGeneration.Design versions


Solution

  • Try to update the dotnet-aspnet-codegenerator to the latest stable version may fix the issue.

    dotnet tool update -g dotnet-aspnet-codegenerator