dotnet / Scaffolding

Code generators to speed up development.
MIT License
702 stars 233 forks source link

error when executing selected code generator: install package microsoft.visualstudio.web.codegeneration.design, cannot perform new scaffolding element #1398

Open jabjack opened 4 years ago

jabjack commented 4 years ago

Issues:

issue12

what i have installed:

issue3

image

I have installed the web.codegeneration.design

image

and it sends me that error and I tested it in aspnet core 2.1 and it's the same. Currently Im use netcore5

This is in an MVC Razor project, I need any help for solve thats issue in my MVC project , if I would have that to put old netcore and whichs for solve thats issue.

deepchoudhery commented 4 years ago

What Visual Studio version are you on? This is a known issue with 16.8 Preview 2

jabjack commented 4 years ago

Visual Studio 2019 , Version: 16.6.2

cezarlamann commented 4 years ago

Maybe #1393 ?

steroyle commented 3 years ago

Getting the same error when trying to add scaffolding, its trying to install version 5.0.2 (current latest) but fails to do so.

What worked for me was manually installing an earlier version

Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Design -Version 5.0.1

deepchoudhery commented 3 years ago

@steroyle What is the error you get when it fails to install? I also recommend after an install to just rebuild the project. That in the past has resolved a ton of dependency issues.

Let me know, Deep

joebhullar commented 3 years ago

I Fixed it!! --> Rebuild Project --> Exit Visual Studios --> Re-load and it works :)

Ahmad-Fraz commented 3 years ago

don't choose a layout page when you are going to choose a model to create a view . In this way you can avoid this error. Same error was thrown to me but then i deselected layout + reference scripts then microsoft.visualstudio.web.codegeneration.design installed successfully.