4

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

1
  • I had the same issue, it is solved when I deleted a space in the path Commented May 21, 2020 at 0:15

2 Answers 2

6

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.

Sign up to request clarification or add additional context in comments.

1 Comment

This solved the problem. The container folder must not have any space.
1

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).

1 Comment

I didn't believe you at first. But removing space from my folder names seems to do the trick. Understood this while installing it to a specific path through CLI. Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.