I'm learning ASP.net, so I'm reading https://docs.microsoft.com/fr-fr/aspnet/core/tutorials/razor-pages/model?view=aspnetcore-3.0&tabs=visual-studio-code and in the section Scaffold the movie model, I must install and run the CRUD tool (ASP.net Core dotnet-aspnet-codegenerator). The problem I encounter is I can't use their tool, an error is output ; however I could install it. Below are the details.
So I'm following the three-steps tutorial to use this CRUD code generator (link given above). I quote:
- Open a command window in the project directory (The directory that contains the Program.cs, Startup.cs, and .csproj files).
✔ It worked.
- Install the scaffolding tool:
dotnet tool install --global dotnet-aspnet-codegenerator
✔ It worked and now if I try to re-install it, it outputs that it's already installed.
- For macOS and Linux: Run the following command:
dotnet aspnet-codegenerator razorpage -m Movie -dc RazorPagesMovieContext -udl -outDir Pages/Movies --referenceScriptLibraries
???? It doesn't work. Here is the output error:
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-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.
Question : How can I debug it to make this command work?
dotnet aspnet-codegenerator? your error says:dotnet-dotnet-aspnet-codegenerator does not existso it looks like you tried to run:dotnet dotnet-aspnet-codegenerator- Konraddotnet aspnet-codegenerator razorpage -m Movie -dc RazorPagesMovieContext -udl -outDir Pages\Movies --referenceScriptLibrariesANDdotnet-aspnet-codegenerator razorpage -m Movie -dc RazorPagesMovieContext -udl -outDir Pages\Movies --referenceScriptLibrariesANDdotnet dotnet-aspnet-codegenerator razorpage -m Movie -dc RazorPagesMovieContext -udl -outDir Pages\Movies --referenceScriptLibraries- None of these three commands does work. :( - JarsOfJam-Scheduler