3.1.401 : dotnet-aspnet-codegenerator: command not found
See original GitHub issueOpened by @drammons at https://github.com/dotnet/AspNetCore.Docs/issues/19785
Got to the generated scaffolding step. Ensured dotnet-aspnet-codegenerator was definitely installed. Tried both variants of the command mentioned in other issues (with and without the hyphen)
$ dotnet --version
3.1.401
$dotnet tool update -g Dotnet-aspnet-codegenerator
Tool 'dotnet-aspnet-codegenerator' was reinstalled with the latest stable version (version '3.1.4').
$dotnet-aspnet-codegenerator controller -name TodoItemsController -async -api -m TodoItem -dc TodoContext -outDir Controllers
dotnet-aspnet-codegenerator: command not found
$ dotnet aspnet-codegenerator controller -name TodoItemsController -async -api -m TodoItem -dc TodoContext -outDir Controllers
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.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 583ae3e7-5915-f22b-e54c-6c100cf2a7da
- Version Independent ID: 95f2549e-29f9-e31a-b4d0-432b971643ff
- Content: Tutorial: Create a web API with ASP.NET Core
- Content Source: aspnetcore/tutorials/first-web-api.md
- Product: aspnet-core
- Technology: aspnetcore-tutorials
- GitHub Login: @Rick-Anderson
- Microsoft Alias: riande
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
ASP.NET Core CRUD tool: command not found but ...
Yes I have run: dotnet aspnet-codegenerator razorpage -m Movie -dc RazorPagesMovieContext -udl -outDir Pages\Movies --referenceScriptLibraries ...
Read more >dotnet aspnet-codegenerator command
Specifies the path of the project file to run (folder name or full path). If not specified, it defaults to the current directory....
Read more >Troubleshoot .NET tool usage issues
Could not execute because the specified command or file was not found. Possible reasons for this include: * You misspelled a built-in dotnet ......
Read more >No executables found matching command 'dotnet-aspnet ...
Under System variables find and select the Path variable, then click Edit . Check if the path to dotnet-aspnet-codegenerator.exe is there and if...
Read more >Visual Studio 2019 unable to locate .Net Core SDK
Step 1) First run dotnet --list-sdks from the command line (as in Grzegorz Smulko's answer). Take note of the greatest version number.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think there is an extra unnecessary ‘-’ on the guidance. It worked for me just using
dotnet aspnet-codegenerator
Is the tool installed at the below location. Reference
I noticed you installed it with a capital
D
have you triedAlso has uninstalling and reinstalling worked