简体   繁体   中英

Context menu doesn't contain Scaffolding VS2015 ASP.NET 5

I'm going through a tutorial on ASP.NET 5 documentation website.

As you can see here the trainer right clicks on the Controller folder and he/she gets a context menu that under the Add sub menu there's a New Scaffolded Item... option.

But as you can see below there's no New Scaffolded Item... option available for me when I right click on my Controller folder!

New Scaffolded Item... is not available

I also don't have Add view... option when I right click inside an action!

I'm using Visual Studio 2015 Updade 1 CTP.

The goal of Asp.Net 5 was to trim away as much functionality as possible and leave only what was 'absolutely essential' starting with .Net Core.

Productivity features like scaffolding don't seem to fall under that 'essential' umbrella and will need to be added as dependencies to your project.

This link might help: Scaffolding MSDN Blog Article .

One caveat: There are many classes that have been renamed from version '1.0.0-beta8 to 1.0.0-rc1-final. And I believe the CodeGenerator is one of them. 'Framework' changed to 'Extensions' within the namespace hierarchy.

Hope that helps...

I just ran into the same problem. Apparently scaffolding only works with entity framework 7.

Adding

"EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final"

to your project.json dependencies should bring back the scaffolding context menu entry...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM