I tried to run the command \'Enable-Migrations\' in a new project and I got the message:
PM> Enable-Migrations
The term \'Enable-Migrations\' is not recog
Make sure you are running Visual Studio as a administrator.
In Visual Studio 2012 I had the same error. Had to uninstall NuGet (Tools > Extensions and Updates > Installed > All: NuGet Package Manager: Uninstall button). Then closed Visual Studio. Then reopened Visual Studio and reinstalled NuGet (Tools > Extensions and Updates > Online > Visual Studio Gallery: NuGet Package Manager: Download button). Then in following windows: click Install button, then click close button. Then close and reopen Visual Studio.
I tried all of the above suggestions but nothing worked for me then I updated Nuget Package Manager
and it worked..
I had the same problem and I found that it is because of some characters in project path like [ or ] I correct the project path and it worked fine!
I had the same issue with VS 2019 Preview, .Net Core, and EntityFramework Core.
Turns out I had to install via NuGet Microsoft.EntityFrameworkCore.Tools
and Microsoft.EntityFrameworkCore.Design
. Once that was done, it worked like a charm.
What fixed this symptom for me (VS2013) is uninstalling then reinstalling the EF package with Nuget. The difference in the csproj file changed this...
<Reference Include="EntityFramework">
<HintPath>..\packages\EntityFramework.6.1.1\lib\net45\EntityFramework.dll</HintPath>
</Reference>
...into this...
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\EntityFramework.6.1.1\lib\net45\EntityFramework.dll</HintPath>
</Reference>
I don't fully understand why yet, but it worked at least.