0
when I try to turn the command:
dotnet aspnet-codegenerator controller -h
I have the following return:
Selected Code Generator: controller
No code generator found with the name 'controller'.
No code generators are available in this project. Please add the 'Microsoft.VisualStudio.Web.CodeGeneration.Design' NuGet package to the project.Add Microsoft.VisualStudio.Web.CodeGeneration.Design package to the project as a NuGet package reference.
I’ve tried that solution, that is to copy the Template/Controllergenerator and Templete/Viewgenerator folders into the project, and also tried to downgrade the version but without success.
- dotnet version: 3.1.405
.csproj
Package folder
.
├── Generators
│ └── ParameterDefinitions
│ ├── area.json
│ ├── controller.json
│ ├── identity.json
│ ├── razorpage.json
│ └── view.json
├── Icon.png
├── lib
│ └── netstandard2.0
│ ├── bootstrap3_identitygeneratorfilesconfig.json
│ ├── bootstrap4_identitygeneratorfilesconfig.json
│ ├── Microsoft.VisualStudio.Web.CodeGenerators.Mvc.dll
│ └── Microsoft.VisualStudio.Web.CodeGenerators.Mvc.xml
├── microsoft.visualstudio.web.codegenerators.mvc.3.1.3.nupkg
├── microsoft.visualstudio.web.codegenerators.mvc.3.1.3.nupkg.sha512
├── microsoft.visualstudio.web.codegenerators.mvc.nuspec
└── Templates
├── ControllerGenerator
│ ├── ApiControllerWithActions.cshtml
│ ├── ApiControllerWithContext.cshtml
│ ├── ApiEmptyController.cshtml
│ ├── ControllerWithActions.cshtml
│ ├── EmptyController.cshtml
│ └── MvcControllerWithContext.cshtml
├── Identity
│ ├── Data
│ │ ├── ApplicationDbContext.cshtml
│ │ └── ApplicationUser.cshtml
│ ├── IdentityHostingStartup.cshtml
│ ├── _LoginPartial.cshtml
│ ├── Pages
│ │ ├── Account
│ │ │ ├── Account.AccessDenied.cs.cshtml
│ │ │ ├── Account.AccessDenied.cshtml
│ │ │ ├── Account.ConfirmEmailChange.cs.cshtml
│ │ │ ├── Account.ConfirmEmailChange.cshtml
│ │ │ ├── Account.ConfirmEmail.cs.cshtml
│ │ │ ├── Account.ConfirmEmail.cshtml
│ │ │ ├── Account.ExternalLogin.cs.cshtml
│ │ │ ├── Account.ExternalLogin.cshtml
│ │ │ ├── Account.ForgotPasswordConfirmation.cs.cshtml
│ │ │ ├── Account.ForgotPasswordConfirmation.cshtml
│ │ │ ├── Account.ForgotPassword.cs.cshtml
│ │ │ ├── Account.ForgotPassword.cshtml
│ │ │ ├── Account.Lockout.cs.cshtml
│ │ │ ├── Account.Lockout.cshtml
│ │ │ ├── Account.Login.cs.cshtml
│ │ │ ├── Account.Login.cshtml
│ │ │ ├── Account.LoginWith2fa.cs.cshtml
│ │ │ ├── Account.LoginWith2fa.cshtml
│ │ │ ├── Account.LoginWithRecoveryCode.cs.cshtml
│ │ │ ├── Account.LoginWithRecoveryCode.cshtml
│ │ │ ├── Account.Logout.cs.cshtml
│ │ │ ├── Account.Logout.cshtml
│ │ │ ├── Account.RegisterConfirmation.cs.cshtml
│ │ │ ├── Account.RegisterConfirmation.cshtml
│ │ │ ├── Account.Register.cs.cshtml
│ │ │ ├── Account.Register.cshtml
│ │ │ ├── Account.ResendEmailConfirmation.cs.cshtml
│ │ │ ├── Account.ResendEmailConfirmation.cshtml
│ │ │ ├── Account.ResetPasswordConfirmation.cs.cshtml
│ │ │ ├── Account.ResetPasswordConfirmation.cshtml
│ │ │ ├── Account.ResetPassword.cs.cshtml
│ │ │ ├── Account.ResetPassword.cshtml
│ │ │ ├── Account._StatusMessage.cshtml
│ │ │ ├── Account._ViewImports.cshtml
│ │ │ └── Manage
│ │ │ ├── Account.Manage.ChangePassword.cs.cshtml
│ │ │ ├── Account.Manage.ChangePassword.cshtml
│ │ │ ├── Account.Manage.DeletePersonalData.cs.cshtml
│ │ │ ├── Account.Manage.DeletePersonalData.cshtml
│ │ │ ├── Account.Manage.Disable2fa.cs.cshtml
│ │ │ ├── Account.Manage.Disable2fa.cshtml
│ │ │ ├── Account.Manage.DownloadPersonalData.cs.cshtml
│ │ │ ├── Account.Manage.DownloadPersonalData.cshtml
│ │ │ ├── Account.Manage.Email.cs.cshtml
│ │ │ ├── Account.Manage.Email.cshtml
│ │ │ ├── Account.Manage.EnableAuthenticator.cs.cshtml
│ │ │ ├── Account.Manage.EnableAuthenticator.cshtml
│ │ │ ├── Account.Manage.ExternalLogins.cs.cshtml
│ │ │ ├── Account.Manage.ExternalLogins.cshtml
│ │ │ ├── Account.Manage.GenerateRecoveryCodes.cs.cshtml
│ │ │ ├── Account.Manage.GenerateRecoveryCodes.cshtml
│ │ │ ├── Account.Manage.Index.cs.cshtml
│ │ │ ├── Account.Manage.Index.cshtml
│ │ │ ├── Account.Manage._Layout.cshtml
│ │ │ ├── Account.Manage._ManageNav.cshtml
│ │ │ ├── Account.Manage.ManageNavPages.cshtml
│ │ │ ├── Account.Manage.PersonalData.cs.cshtml
│ │ │ ├── Account.Manage.PersonalData.cshtml
│ │ │ ├── Account.Manage.ResetAuthenticator.cs.cshtml
│ │ │ ├── Account.Manage.ResetAuthenticator.cshtml
│ │ │ ├── Account.Manage.SetPassword.cs.cshtml
│ │ │ ├── Account.Manage.SetPassword.cshtml
│ │ │ ├── Account.Manage.ShowRecoveryCodes.cs.cshtml
│ │ │ ├── Account.Manage.ShowRecoveryCodes.cshtml
│ │ │ ├── Account.Manage._StatusMessage.cshtml
│ │ │ ├── Account.Manage.TwoFactorAuthentication.cs.cshtml
│ │ │ ├── Account.Manage.TwoFactorAuthentication.cshtml
│ │ │ └── Account.Manage._ViewImports.cshtml
│ │ ├── Error.cs.cshtml
│ │ ├── Error.cshtml
│ │ ├── _Layout.cshtml
│ │ ├── _ValidationScriptsPartial.cshtml
│ │ ├── _ViewImports.cshtml
│ │ └── _ViewStart.cshtml
│ ├── ScaffoldingReadme.cshtml
│ ├── SupportPages._CookieConsentPartial.cshtml
│ ├── SupportPages._ViewImports.cshtml
│ ├── SupportPages._ViewStart.cshtml
│ └── wwwroot
│ ├── css
│ │ └── site.css
│ ├── favicon.ico
│ ├── js
│ │ └── site.js
│ └── lib
│ ├── bootstrap
│ │ ├── dist
│ │ │ ├── css
│ │ │ │ ├── bootstrap.css
│ │ │ │ ├── bootstrap.css.map
│ │ │ │ ├── bootstrap-grid.css
│ │ │ │ ├── bootstrap-grid.css.map
│ │ │ │ ├── bootstrap-grid.min.css
│ │ │ │ ├── bootstrap-grid.min.css.map
│ │ │ │ ├── bootstrap.min.css
│ │ │ │ ├── bootstrap.min.css.map
│ │ │ │ ├── bootstrap-reboot.css
│ │ │ │ ├── bootstrap-reboot.css.map
│ │ │ │ ├── bootstrap-reboot.min.css
│ │ │ │ └── bootstrap-reboot.min.css.map
│ │ │ └── js
│ │ │ ├── bootstrap.bundle.js
│ │ │ ├── bootstrap.bundle.js.map
│ │ │ ├── bootstrap.bundle.min.js
│ │ │ ├── bootstrap.bundle.min.js.map
│ │ │ ├── bootstrap.js
│ │ │ ├── bootstrap.js.map
│ │ │ ├── bootstrap.min.js
│ │ │ └── bootstrap.min.js.map
│ │ └── LICENSE
│ ├── jquery
│ │ ├── dist
│ │ │ ├── jquery.js
│ │ │ ├── jquery.min.js
│ │ │ └── jquery.min.map
│ │ └── LICENSE.txt
│ ├── jquery-validation
│ │ ├── dist
│ │ │ ├── additional-methods.js
│ │ │ ├── additional-methods.min.js
│ │ │ ├── jquery.validate.js
│ │ │ └── jquery.validate.min.js
│ │ └── LICENSE.md
│ └── jquery-validation-unobtrusive
│ ├── jquery.validate.unobtrusive.js
│ ├── jquery.validate.unobtrusive.min.js
│ └── LICENSE.txt
├── Identity_Versioned
│ └── Bootstrap3
│ ├── Data
│ │ ├── ApplicationDbContext.cshtml
│ │ └── ApplicationUser.cshtml
│ ├── IdentityHostingStartup.cshtml
│ ├── _LoginPartial.cshtml
│ ├── Pages
│ │ ├── Account
│ │ │ ├── Account.AccessDenied.cs.cshtml
│ │ │ ├── Account.AccessDenied.cshtml
│ │ │ ├── Account.ConfirmEmailChange.cs.cshtml
│ │ │ ├── Account.ConfirmEmailChange.cshtml
│ │ │ ├── Account.ConfirmEmail.cs.cshtml
│ │ │ ├── Account.ConfirmEmail.cshtml
│ │ │ ├── Account.ExternalLogin.cs.cshtml
│ │ │ ├── Account.ExternalLogin.cshtml
│ │ │ ├── Account.ForgotPasswordConfirmation.cs.cshtml
│ │ │ ├── Account.ForgotPasswordConfirmation.cshtml
│ │ │ ├── Account.ForgotPassword.cs.cshtml
│ │ │ ├── Account.ForgotPassword.cshtml
│ │ │ ├── Account.Lockout.cs.cshtml
│ │ │ ├── Account.Lockout.cshtml
│ │ │ ├── Account.Login.cs.cshtml
│ │ │ ├── Account.Login.cshtml
│ │ │ ├── Account.LoginWith2fa.cs.cshtml
│ │ │ ├── Account.LoginWith2fa.cshtml
│ │ │ ├── Account.LoginWithRecoveryCode.cs.cshtml
│ │ │ ├── Account.LoginWithRecoveryCode.cshtml
│ │ │ ├── Account.Logout.cs.cshtml
│ │ │ ├── Account.Logout.cshtml
│ │ │ ├── Account.RegisterConfirmation.cs.cshtml
│ │ │ ├── Account.RegisterConfirmation.cshtml
│ │ │ ├── Account.Register.cs.cshtml
│ │ │ ├── Account.Register.cshtml
│ │ │ ├── Account.ResendEmailConfirmation.cs.cshtml
│ │ │ ├── Account.ResendEmailConfirmation.cshtml
│ │ │ ├── Account.ResetPasswordConfirmation.cs.cshtml
│ │ │ ├── Account.ResetPasswordConfirmation.cshtml
│ │ │ ├── Account.ResetPassword.cs.cshtml
│ │ │ ├── Account.ResetPassword.cshtml
│ │ │ ├── Account._StatusMessage.cshtml
│ │ │ ├── Account._ViewImports.cshtml
│ │ │ └── Manage
│ │ │ ├── Account.Manage.ChangePassword.cs.cshtml
│ │ │ ├── Account.Manage.ChangePassword.cshtml
│ │ │ ├── Account.Manage.DeletePersonalData.cs.cshtml
│ │ │ ├── Account.Manage.DeletePersonalData.cshtml
│ │ │ ├── Account.Manage.Disable2fa.cs.cshtml
│ │ │ ├── Account.Manage.Disable2fa.cshtml
│ │ │ ├── Account.Manage.DownloadPersonalData.cs.cshtml
│ │ │ ├── Account.Manage.DownloadPersonalData.cshtml
│ │ │ ├── Account.Manage.Email.cs.cshtml
│ │ │ ├── Account.Manage.Email.cshtml
│ │ │ ├── Account.Manage.EnableAuthenticator.cs.cshtml
│ │ │ ├── Account.Manage.EnableAuthenticator.cshtml
│ │ │ ├── Account.Manage.ExternalLogins.cs.cshtml
│ │ │ ├── Account.Manage.ExternalLogins.cshtml
│ │ │ ├── Account.Manage.GenerateRecoveryCodes.cs.cshtml
│ │ │ ├── Account.Manage.GenerateRecoveryCodes.cshtml
│ │ │ ├── Account.Manage.Index.cs.cshtml
│ │ │ ├── Account.Manage.Index.cshtml
│ │ │ ├── Account.Manage._Layout.cshtml
│ │ │ ├── Account.Manage._ManageNav.cshtml
│ │ │ ├── Account.Manage.ManageNavPages.cshtml
│ │ │ ├── Account.Manage.PersonalData.cs.cshtml
│ │ │ ├── Account.Manage.PersonalData.cshtml
│ │ │ ├── Account.Manage.ResetAuthenticator.cs.cshtml
│ │ │ ├── Account.Manage.ResetAuthenticator.cshtml
│ │ │ ├── Account.Manage.SetPassword.cs.cshtml
│ │ │ ├── Account.Manage.SetPassword.cshtml
│ │ │ ├── Account.Manage.ShowRecoveryCodes.cs.cshtml
│ │ │ ├── Account.Manage.ShowRecoveryCodes.cshtml
│ │ │ ├── Account.Manage._StatusMessage.cshtml
│ │ │ ├── Account.Manage.TwoFactorAuthentication.cs.cshtml
│ │ │ ├── Account.Manage.TwoFactorAuthentication.cshtml
│ │ │ └── Account.Manage._ViewImports.cshtml
│ │ ├── Error.cs.cshtml
│ │ ├── Error.cshtml
│ │ ├── _Layout.cshtml
│ │ ├── _ValidationScriptsPartial.cshtml
│ │ ├── _ViewImports.cshtml
│ │ └── _ViewStart.cshtml
│ ├── ScaffoldingReadme.cshtml
│ ├── SupportPages._CookieConsentPartial.cshtml
│ ├── SupportPages._ViewImports.cshtml
│ ├── SupportPages._ViewStart.cshtml
│ └── wwwroot
│ ├── css
│ │ └── site.css
│ ├── favicon.ico
│ ├── images
│ │ ├── banner1.svg
│ │ ├── banner2.svg
│ │ └── banner3.svg
│ ├── js
│ │ └── site.js
│ └── lib
│ ├── bootstrap
│ │ ├── dist
│ │ │ ├── css
│ │ │ │ ├── bootstrap.css
│ │ │ │ ├── bootstrap.css.map
│ │ │ │ ├── bootstrap.min.css
│ │ │ │ ├── bootstrap.min.css.map
│ │ │ │ ├── bootstrap-theme.css
│ │ │ │ ├── bootstrap-theme.css.map
│ │ │ │ ├── bootstrap-theme.min.css
│ │ │ │ └── bootstrap-theme.min.css.map
│ │ │ ├── fonts
│ │ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ │ ├── glyphicons-halflings-regular.svg
│ │ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ │ └── glyphicons-halflings-regular.woff2
│ │ │ └── js
│ │ │ ├── bootstrap.js
│ │ │ ├── bootstrap.min.js
│ │ │ └── npm.js
│ │ └── LICENSE
│ ├── jquery
│ │ ├── dist
│ │ │ ├── jquery.js
│ │ │ ├── jquery.min.js
│ │ │ └── jquery.min.map
│ │ └── LICENSE.txt
│ ├── jquery-validation
│ │ ├── dist
│ │ │ ├── additional-methods.js
│ │ │ ├── additional-methods.min.js
│ │ │ ├── jquery.validate.js
│ │ │ └── jquery.validate.min.js
│ │ └── LICENSE.md
│ └── jquery-validation-unobtrusive
│ ├── jquery.validate.unobtrusive.js
│ ├── jquery.validate.unobtrusive.min.js
│ └── LICENSE.txt
├── MvcLayout
│ ├── Error.cshtml
│ └── _Layout.cshtml
├── RazorPageGenerator
│ ├── Create.cshtml
│ ├── CreatePageModel.cshtml
│ ├── Delete.cshtml
│ ├── DeletePageModel.cshtml
│ ├── Details.cshtml
│ ├── DetailsPageModel.cshtml
│ ├── Edit.cshtml
│ ├── EditPageModel.cshtml
│ ├── Empty.cshtml
│ ├── EmptyPageModel.cshtml
│ ├── List.cshtml
│ ├── ListPageModel.cshtml
│ └── _ValidationScriptsPartial.cshtml
├── RazorPageGenerator_Versioned
│ └── Bootstrap3
│ ├── Create.cshtml
│ ├── CreatePageModel.cshtml
│ ├── Delete.cshtml
│ ├── DeletePageModel.cshtml
│ ├── Details.cshtml
│ ├── DetailsPageModel.cshtml
│ ├── Edit.cshtml
│ ├── EditPageModel.cshtml
│ ├── Empty.cshtml
│ ├── EmptyPageModel.cshtml
│ ├── List.cshtml
│ ├── ListPageModel.cshtml
│ └── _ValidationScriptsPartial.cshtml
├── Startup
│ ├── ReadMe.cshtml
│ └── Startup.cshtml
├── ViewGenerator
│ ├── Create.cshtml
│ ├── Delete.cshtml
│ ├── Details.cshtml
│ ├── Edit.cshtml
│ ├── Empty.cshtml
│ ├── List.cshtml
│ └── _ValidationScriptsPartial.cshtml
└── ViewGenerator_Versioned
└── Bootstrap3
├── Create.cshtml
├── Delete.cshtml
├── Details.cshtml
├── Edit.cshtml
├── Empty.cshtml
├── List.cshtml
└── _ValidationScriptsPartial.cshtml
