No executable found matching command "dotnet-aspnet-codegenerator"
See original GitHub issueDescribe the bug
At this point of the tutorial : https://docs.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/model?view=aspnetcore-3.0&tabs=visual-studio-code#scaffold-the-movie-model we are asked to install the dotnet-aspnet-codegenerator
tool. There is no problem installing it but as soon as I try to execute the command dotnet aspnet-codegenerator razorpage -m Movie -dc RazorPagesMovieContext -udl -outDir Pages/Movies --referenceScriptLibraries
I’ve got this error in terminal : Aucun exécutable ne correspond à la commande "dotnet-aspnet-codegenerator"
I have try everything found on other issues that seems similar but most of them are related to version 2.2.0… and wont work 😦
To Reproduce
Steps to reproduce the behavior:
- Using this version of ASP.NET Core ‘2.2.104’
- (Follow the tutorial until you are asked to) Run this code
dotnet aspnet-codegenerator razorpage
- With these arguments
-m Movie -dc RazorPagesMovieContext -udl -outDir Pages/Movies --referenceScriptLibraries
- See error :
Aucun exécutable ne correspond à la commande "dotnet-aspnet-codegenerator"
Expected behavior
In my opinion it should generate the proper views 😉
Additional context
Using zsh instead of bash, no idea if this can help…
Output of dotnet --info
SDK .NET Core (reflétant tous les global.json) :
Version: 2.2.104
Commit: 73f036d4ac
Environnement d'exécution :
OS Name: ubuntu
OS Version: 18.10
OS Platform: Linux
RID: ubuntu.18.10-x64
Base Path: /usr/share/dotnet/sdk/2.2.104/
Host (useful for support):
Version: 2.2.2
Commit: a4fd7b2c84
.NET Core SDKs installed:
2.2.104 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.2.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (4 by maintainers)
Top GitHub Comments
$HOME/.dotnet/tools
is what you need to add to pathexport PATH=$PATH:$HOME/.dotnet/tools
@wli3 works like a charm !
Thanks everyone !