Scaffolding controller doesn't work with visual studio 2013 update 2

Solution 1:

Hey for all of you that nothing works, the real answer is you need to remove ANYTHING that has a configSource on the web.config and the connection string needs to be inlined.

EDIT:

Someone pointed out that it needs to be only <configSettings>, <appSettings>, and <connectionStrings> tags NOT using a configSource attribute. And that he was still able to use configSource attributes elsewhere, such as the rewriter tag.

I think it's that the tooling cannot follow configSource locations for the stuff it uses like connection strings and application settings.

Microsoft should be on this issue if not fixed yet.

EDIT 2:

Even thought @awrigley has marked his answer as correct it's a known Visual Studio bug. I've managed to tell then and I think it will get some attention soon. https://github.com/aspnet/Tooling/issues/169#issuecomment-144197015

Solution 2:

A combination of things have worked for me:

  1. Upgrade to Visual Studio 2013 Update 3.

  2. Upgrade Entity Framework to 6.1.1

  3. Modify the context configuration to use IDbSet<...> instead of DbSet<...> (I have heard that this can affect using async actions, but not apparently in my case, as I use this in my login actions, etc, as supplied by ASP.NET Identity 2 sample Nuget package).

Quite why this combination works, I have no idea. But then given the thundering silence from MS, I am probably not alone. I guess update 2 just didn't work...

Solution 3:

Solution

Make sure section

<connectionStrings>..</connectionStrings>

is after

<configSections>..</configSections>