skip to Main Content

When I right click the controllers folder and select add, new scaffolding, empty MVC Controller, the ASP.NET Core Scaffolder gives me this error. I then added it to the project through the Nuget Manager and still have no luck. I am new to .NET and Visual Studio so any help is appreciated.

I am following this video tutorial to implement CRUD on asp.net MVC https://www.youtube.com/watch?v=C5cnZ-gZy2I

I’ve had similar issues in the past that were solved with adding something to my $PATH so here is the output of echo $PATH

/Users/raj/.gem/ruby/2.3.3/bin:/Users/raj/.rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/bin:/Users/raj/.rubies/ruby-2.3.3/bin:/Users/raj/.rvm/gems/ruby-2.4.5/bin:/Users/raj/.rvm/gems/ruby-2.4.5@global/bin:/Users/raj/.rvm/rubies/ruby-2.4.5/bin:/usr/local/opt/[email protected]/sbin:/usr/local/opt/[email protected]/bin:/Users/raj/google-cloud-sdk/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/opt/X11/bin:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Postgres.app/Contents/Versions/latest/bin:/Users/raj/.dotnet/tools:/Applications/Postgres.app/Contents/Versions/9.6/bin:/Users/raj/.rvm/bin

enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    When Visual Studio attempted to install "dotnet-aspnet-codegenerator" it would bomb because of the space located in the path "Google Drive". I moved the project to a directory with no spaces and it works fine.


  2. It worked for me:

    1. dotnet tool uninstall -g dotnet-aspnet-codegenerator
    2. dotnet tool install -g dotnet-aspnet-codegenerator

    …and if it is still not working:

    1. Make sure your Project is in the default folder: /Users/yourname/Projects (in my case is MacOS).
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search