Scaffolding using terminal dosen't work

I was following the ASP.NET Core MVC tutorial from adding-model
but when I run the command
dotnet aspnet-codegenerator controller -name MoviesController -m Movie -dc MvcMovieContext --relativeFolderPath Controllers --useDefaultLayout --referenceScriptLibraries
it shows the following error in terminal:
Building project ...
Finding the generator 'controller'...
Running the generator 'controller'...
Attempting to compile the application in memory.
Attempting to figure out the EntityFramework metadata for the model and DbContext: 'Movie'
A file matching the name MvcControllerWithContext.cshtml was not found within any of the folders:
at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.<BuildCommandLine>b__6_0()
at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.Execute(String[] args)
at Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execute(String[] args)
RunTime 00:00:07.06
I am using .NET SDK 5.0 in manjaro linux 20.2.
.NET SDK (reflecting any global.json):
Version: 5.0.100
Commit: 5044b93829
Host (useful for support):
Version: 5.0.0
Commit: cf258a14b7
.NET SDKs installed:
5.0.100 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 5.0.0
Microsoft.NETCore.App 5.0.0
I finally found solution from here-
https://github.com/dotnet/Scaffolding/issues/1387#issuecomment-735289808
I can confirm that this issue exists at least since the autumn last year. I have not found solution for it. Using Ubuntu 18.04.5 LTS, Rider EAP 2020.3. C# 9, dotnet-aspnet-codegenerator version '5.0.1', dotnet 5.0.102.
When running the utility to build crud pages for Razor Pages web app:
The following output is given:
Same repository, Win10 + Rider then everything OK.
This issue appears to still be active. I have tested using .NET 5 and 6 on macOS Monterey 12.2.1
Sign in to comment