After adding package Microsoft.VisualStudio.Web.CodeGeneration.Design I still get error message.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
You need .NET SDK 2.1
I forgot to add the DotNetCliToolReference element to csproj.
No executable found matching command "dotnet-aspnet-codegenerator" I got this error !!
Install the latest version of the .NET Core SDK But not the preview version.
It's no longer a <DotNetCliToolReference/>
element.
It's a global tool.
Follow this link
https://stackoverflow.com/questions/51128038/no-executable-found-matching-command-dotnet-aspnet-codegenerator-asp-net-core
On Mon, Sep 17, 2018 at 4:41 PM Mohammad Touhidul Islam <
[email protected]> wrote:
No executable found matching command "dotnet-aspnet-codegenerator" I got
this error !!—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/aspnet/Docs/issues/6999#issuecomment-421967509, or mute
the thread
https://github.com/notifications/unsubscribe-auth/Ahierr0-AI9WtblqyUa_ARp0lT8f7U2Fks5ub3_jgaJpZM4Uktrz
.
@bricelam is MacOS the only platform you need to explicitly dotnet tool install --global dotnet-aspnet-codegenerator
No idea. The aspnet/Scaffolding folks own that tool.
dotnet tool install --global dotnet-aspnet-codegenerator
works also on Windows for me! Could'nt install it via nuget neither by adding an item group to the .csproj file.
Thanks @Rick-Anderson
I was able to reproduce the same issue on Linux/VSCode and Linux/dotnet CLI. My current setup gives pretty confusing results:
dot_sent@sergey-pc:~/Projects/MVCTest/MvcIdentity$ dotnet tool install --global dotnet-aspnet-codegenerator
Tool 'dotnet-aspnet-codegenerator' is already installed.
dot_sent@sergey-pc:~/Projects/MVCTest/MvcIdentity$ dotnet aspnet-codegenerator --help
No executable found matching command "dotnet-aspnet-codegenerator"
dotnet --info
output, in case it helps:
dot_sent@sergey-pc:~/Projects/MVCTest/MvcIdentity$ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.1.504
Commit: 91e160c7f0
Runtime Environment:
OS Name: ubuntu
OS Version: 16.04
OS Platform: Linux
RID: ubuntu.16.04-x64
Base Path: /usr/share/dotnet/sdk/2.1.504/
Host (useful for support):
Version: 2.1.8
Commit: 209f8aa25c
.NET Core SDKs installed:
2.1.101 [/usr/share/dotnet/sdk]
2.1.504 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
@dot-sent can you open an issue at https://github.com/dotnet/cli/issues/new
@dot-sent install the latest SDK first, 2.2
@Rick-Anderson Done, still the same problem. Tried also uninstalling 2.0 and 2.1, reinstalling the aspnet-codegenerator - all to no avail. Finally installing it in a specific directory and running it via absolute path worked well. I guess some paths were not registering properly. Should I still open the issue on dotnet-cli?
dotnet --version
2.2.103
dotnet tool install --global dotnet-aspnet-codegenerator
~/.dotnet/tools/dotnet-aspnet-codegenerator -h
dotnet tool install --global dotnet-aspnet-codegenerator
worked on Ubuntu too.
@JwanKhalaf It worked for me on Windows 10. Thanks a lot!
I just typed:
~/.dotnet/tools/dotnet-aspnet-codegenerator razorpage -m Movie -dc RazorPagesMovieContext -udl -outDir Pages/Movies --referenceScriptLibraries
So, I did not start with 'dotnet'.
I just typed:
~/.dotnet/tools/dotnet-aspnet-codegenerator razorpage -m Movie -dc RazorPagesMovieContext -udl -outDir Pages/Movies --referenceScriptLibrariesSo, I did not start with 'dotnet'.
Alright, thanks @rlassche that worked for me. I have no clue why this solves it. can someone explains this issue?
I checked this issue again. This looks better:
export PATH=~/.dotnet/tools:$PATH
$ dotnet aspnet-codegenerator
Most helpful comment
@bricelam is MacOS the only platform you need to explicitly
dotnet tool install --global dotnet-aspnet-codegenerator