我正在使用Mac的Visual Studio 2019(8.6.3)。我有一个使用ASP.net核心的MVC应用程序。我安装了
Microsoft.VisualStudio.Web.CodeGeneration.Design
NuGet软件包。然后,按照一个教程(https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/adding-model?view=aspnetcore-3.1&tabs=visual-studio-mac#add-a-data-model-class),我打开了一个命令窗口
,然后输入以下内容。但是,我得到了错误...
localhost:DemoMVCApp satishp$ dotnet aspnet-codegenerator controller -name MoviesController -m Movie -dc MvcMovieContext --relativeFolderPath Controllers --useDefaultLayout --referenceScriptLibraries
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET Core program, but dotnet-aspnet-codegenerator does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
我还需要做些什么来安装/执行我的代码生成器?