question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No executable found matching command "dotnet-aspnet-codegenerator"

See original GitHub issue

Describe 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:

  1. Using this version of ASP.NET Core ‘2.2.104’
  2. (Follow the tutorial until you are asked to) Run this code dotnet aspnet-codegenerator razorpage
  3. With these arguments -m Movie -dc RazorPagesMovieContext -udl -outDir Pages/Movies --referenceScriptLibraries
  4. 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:closed
  • Created 5 years ago
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
wli3commented, Apr 2, 2019

$HOME/.dotnet/tools is what you need to add to path

export PATH=$PATH:$HOME/.dotnet/tools

1reaction
pitrackstercommented, Apr 3, 2019

@wli3 works like a charm !

Thanks everyone !

Read more comments on GitHub >

github_iconTop Results From Across the Web

No executables found matching command 'dotnet-aspnet- ...
If you're using csproj (Visual Studio 2017) instead of project.json, then you need to add the following to your csproj file:
Read more >
No executable found matching command "dotnet-aspnet ...
In the section "Scaffold the student model", you say that I need to run the following lines in the CLI. "dotnet add package...
Read more >
No executable found matching command "dotnet-aspnet- ...
The `dotnet aspnet-codegenerator` command needs to be run in the same directory as the csproj file. The default working directory for the ...
Read more >
How to resolve no executable found matching command ...
How do I solve no executable found matching command dotnet-asp net. I'm using ASP.NET core 1.0. When I try to add a controller...
Read more >
No executable found matching command “dotnet-aspnet ...
C# – No executable found matching command “dotnet-aspnet-codegenerator” asp.net core 2.1 project in mac. asp.netasp.net-coreasp.net-core-2.1c++.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found