There are no scaffolders supported for this item Visual Studio 2019

女生的网名这么多〃 提交于 2019-11-30 23:19:59

问题


I'm using Visual Studio 2019 version 16.0.4, and I tried to create a view or a partial one on asp.net core 2.1 (in views folder) but I get an error

There are no scaffolders supported for this item

Then I realized this problem happens when you have a folder which its name is "Pages" in your project that we use this folder for razor pages .

If I remove the pages folder then the views scaffold works. When I put it back it is broken again.

I don't know it is a bug or not but I need to use both pages and views together on my project...


回答1:


Update 31/7/2019

I was mistaken (24th Update), see comments on this post, it's apparently still broken, either way, the original answer below still works, in both cases.

Update 24/7/2019

The answer below still stands if your using an older release of Visual Studio 2019, however please be aware this has now been fixed in the more up-to date releases:

https://developercommunity.visualstudio.com/content/problem/562039/there-are-no-scaffolders-supported-for-this-item-1.html


Original Answer

There's currently a known bug in Visual Studio 2019 for this scenario.

There is some semi official advice on the GitHub issue tracker, but it doesn't always work.

MS Will fix it eventually, there appears to currently be no timescale.

For now however, if you right click and use add new item:

Then pick the item type you want (In my case it's a razor page)

Then you'll find everything still works as expected. The bug only seems to affect the shortcut menus.




回答2:


I see this problem in my visual studio when I add "Pages" Folder to my ASP.NET MVC core project. before I adding this folder, scaffolding works fine, and when I add this, I see the error. Also when I remove "Pages" folder, scaffolding work fine again. ;)



来源:https://stackoverflow.com/questions/56205382/there-are-no-scaffolders-supported-for-this-item-visual-studio-2019

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!