Visual Studio 2013 Scaffolding Error

18,770

Solution 1

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)

Solution 2

I used package manager console to uninstall MVCScaffolding, T4Scaffolding, and T4Scaffolding.Core according to their dependencies. Restart VS2013 and it works.

Solution 3

I'm facing same situation with you. what i did was

  1. open packages.config remove T4Scaffolding.Core and T4Scaffolding

  2. Reinstall those packages Install-Package T4Scaffolding and Install-Package T4Scaffolding.Core

  3. Close VS2013 and reopen and you should able to scaffold again

Good Luck!

Solution 4

This situation is arriving when you already have T4Scaffolding used in one of your projects in the solution and you added the web project later. Uninstalling T4Scaffolding and T4Scaffolding.Core from package manager console resolved the issue. Somehow I lost the reference to EntityFramework also while uninstgalling the scaffolding, so I had to add the EntityFramework reference again.

Solution 5

Usually after I have installed some new nugget packages, I bump into this error in an attempt to add/scaffold a new controller for example. My solution is just restart VS2013

Share:
18,770
James Reategui
Author by

James Reategui

Software Engineer/Designer. Microsoft Technologies and .Net C# expert. Love working with the latest tools and frameworks. Design and build compelling apps on the asp net stack including Web API & MVC. Now on the Single Page App route.

Updated on June 28, 2022

Comments

  • James Reategui
    James Reategui almost 2 years

    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.

  • dave heywood
    dave heywood over 10 years
    Thanks, was working around this, I had T4ScaffoldingController installed, and was getting this problem for a couple of weeks.. Just done the uninstall, restarted VS and all working normally again now....
  • David Tansey
    David Tansey about 10 years
    This fixed the problem for me as well.
  • Alex Kilpatrick
    Alex Kilpatrick about 10 years
    Even though this is the opposite of the accepted answer, this fixed my problem.
  • Jared Thirsk
    Jared Thirsk about 9 years
    Uninstalling it didn't seem to work for me so I deleted packages/T4Scaffolding* from the disk and then it worked.
  • Steve Johnson
    Steve Johnson about 9 years
    I had Visual Studio 2013 Update 4 installed and was working with MVC5 with Entity Framework 6.1.1 and I had the exact same error. Updating the Entity Framework to 6.1.2 helped fixed the problem. Be Sure to restart VS 2013 after EF update.
  • Musakkhir Sayyed
    Musakkhir Sayyed about 9 years
    Not necessary to restart it.
  • RogerB
    RogerB over 8 years
    I did not have T4Scaffolding or MVCMailer in my project, however I did get scaffolding to work after simply restarting VS2013. Nothing else. No idea why this would work, I hadn't added any new packages or changed any references etc but it did, Very annoying when something totally unrelated appears to be the solution, but hey ho.
  • Geovani Martinez
    Geovani Martinez over 7 years
    This helped. The issue was triggered by me upgrading the project to MVC5 .NET 4.5 my T4Scaffolding was still targeting .NET 4.0. After an uninstall and reinstall of T4Scaffolding the packages.config reflected a change of targetFramework="net45" for T4Scaffolding. Restarted Visual Studio and the issue went away.