Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2013 Scaffolding Error

I'm using VS 2013 RTM Ultimate, and when I try to add a Controller to my MVC 5 project I get the following error:

"There was an error running the selected code generator: 'The Parameter searchFolders does not contain any entries. Provide at least one folder to search files.'

None of the scaffolders work basically, all giving the same error... Tried rebuidling / clean etc and still get error.

Update Oct 28: Looks like it is a problem with having T4Scaffolding installed. Looks like they are working on a fix.

like image 608
James Reategui Avatar asked Oct 28 '13 03:10

James Reategui


People also ask

How to enable scaffolding in Visual Studio?

In Visual Studio, select Tools and then Extensions and Updates. From this dialog search the Visual Studio Gallery for Web Forms Scaffolding. For more information, see Web Forms Scaffolding.

How to use scaffolding in MVC?

To add a scaffold, right-click on Controllers folder in the Solution Explorer and select Add → New Scaffolded Item. It will display the Add Scaffold dialog. Select MVC 5 Controller with views, using Entity Framework in the middle pane and click 'Add' button, which will display the Add Controller dialog.

What is scaffolding in ASP net core?

Scaffolding in ASP.NET Core is a technique used to generate code at design time to support a number of common application scenarios when working with Entity Framework Core. The code generation tool is available as a Nuget package.


1 Answers

If you have recently installed a package with T4Scaffolding dependency (ex. MVCMailer uses T4Scaffolding.Core), then you can uninstall T4Scaffolding.Core and restart VS 2013. Notice that MvcMailer which caused this in my case, won't work in 2013. Best is to check your references or packages for suspects.

From comments: Uninstalling it didn't seem to work for me, so I deleted packages/T4Scaffolding from the disk* and then it worked. (by Jared Thirsk)

like image 72
AKhooli Avatar answered Sep 22 '22 09:09

AKhooli