I am using EF5 beta1 and while I was able to run the \"Update-Database\" before. Now that I shut down Visual Studio, I cannot get it to run. I get the following error:
I solved by updateing Package Manager Console.
I was not getting Update-Database in Package Manager Console. Then i restart several time. Also restart Windows.
Then I download new one from nuget and then it was solved.
In my case:
But I found an article where suggestion was to manualy import missing EF package, using PM Conole:
Import-Module .\packages\EntityFramework.X.X.X\tools\EntityFramework.psm1
And this solution solved my problem.
you will get this error when the EF tools are not installed properly.
try the below command in Nuget package manager //Uninstalls and install the same Version of EF
Update-Package "EntityFramework" -reinstall
If you still face the same issue. create a new Web Project and run the below command in nuget.
(Note : no need to create the new Project in the same solution or same location.)
// This will update EF to latest version(including the tools)
// if you want to use specific version , use the -version
flag.
Update-Package "EntityFramework"
Once this is done, chcek your original project and you can delete the newly created project.
Sometimes when I load VS, I see this in my package manager console:
Value cannot be null.
Parameter name: path1
I have no idea what causes that yet but it seems that something goes wrong during the start-up of the Powershell console which interrupts the registering of specific modules, such as the EF powershell extensions. You can just manually load it however:
Import-Module .\packages\EntityFramework.6.1.1\tools\EntityFramework.psm1
Make sure you replace 6.1.1 with whatever your current version of Entity Framework is.
Just restart Visual Studio, it'll solve the problem. Works for me.
For me the problem was the Nuget version.