3

MVC4/EF5 VS2012 ultimate and I did an upgrade to EF6, thinking it might help with a problem.

I now find I cannot create a scaffold controller. MS clearly says they will not support scaffold in MCV4. I don't know enough to attempt to scaffold myself.

I'm a newbie and trying to learn by modifying/applying Conosto to my needs, barely able to keep going. I no longer see EF5 in NuGet. I do have another computer with VS2012/mvc4 and EF5.

I can reinstall VS2012 which comes with EF4.1 Can I then copy EF5 (since I can't NuGet it).

Could I just find the proper folder, copy ef5, and change webconfig (or where)? What steps should I take.

I just looked at MS API notes on upgrading to MVC5 and it seems daunting to a newbie. Suggestions? Recommendations?

Josh Crozier
  • 233,099
  • 56
  • 391
  • 304
user2887440
  • 51
  • 1
  • 8
  • I am still using MVCScaffolding for MVC4 in VS 2112 with no issues. I just found a problem with VS 2013, it is not even possible to install the nuget package "MVCScaffolding", unfortunately. – Fernando Vezzali Nov 21 '13 at 09:44

1 Answers1

8

UPDATE: To overcome the error in the comments, uninstall the previous version. ( I've updated the answer below to include this. )

You can install the previous version of Entity Framework (5.0.0 in this case) from Nuget via the Package Manager Console as follows

First, uninstall the previous version.

In Visual Studio, go to the Package Manager Console via Tools -> Library Package Manager -> Package Manager Console.

In the >PM Prompt, type the following.

Uninstall-Package EntityFramework -Force

After the uninstall succeeds, in the >PM Prompt, type the following.

Install-Package EntityFramework -Version 5.0.0

Before you hit enter make sure that the Source dropdown shows nuget.org and also the Default Project dropdown shows the project that you have EF6 installed in. If it doesn't, select your Project that has the EF6 Nuget in from the Default Project dropdown, and then enter the command above to re-install the previous version.

Shiva
  • 20,575
  • 14
  • 82
  • 112
  • 1
    My model (edmx) had a meltdown after I did this a couple of weeks ago it wouldn't update/modify the generated POCO files with any changes made to the model. My model was extremely vanilla in the sense that it was just all of the tables in the DB so I blew it away and recreated it and it was fine after that. – Rob Nov 21 '13 at 01:34
  • Did as suggested, but failed. PM> Install-Package EntityFramework -Version 5.0.0 Installing 'EntityFramework 5.0.0'. Successfully installed 'EntityFramework 5.0.0'. Install failed. Rolling back... Install-Package : Already referencing a newer version of 'EntityFramework'. At line:1 char:16 + Install-Package <<<< EntityFramework -Version 5.0.0 + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand – user2887440 Nov 21 '13 at 01:37
  • @user2887440 Updated the answer to resolve this error. Try it and let us know if it worked! – Shiva Nov 21 '13 at 02:49
  • Yea That worked. Many thanks from a newbie. How do I give this a green arrow? – user2887440 Nov 21 '13 at 12:59
  • @user2887440 Glad it worked! To accept my answer, click on the check mark beside my answer to toggle it from hollow to green. If you get stuck, see here on how to accept it. http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work – Shiva Nov 21 '13 at 16:25