2
votes

I am using EF core migration Visual Studio 2017 update 2 and latest asp.net core 1.1

My csproj

<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="1.1.2" />
<PackageReference Include="Microsoft.CSharp" Version="4.3.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="1.1.1" />
<PackageReference Include="System.Collections" Version="4.3.0" />
<PackageReference Include="System.Linq" Version="4.3.0" />
<PackageReference Include="System.Runtime" Version="4.3.0" />
<PackageReference Include="System.Threading" Version="4.3.0" />

I am able to run the command

Add-Migration

in my package manager console

However I am not able to run the command

Script-Migration 

as I get the error message

Script-Migration' is not recognized as the name of a cmdlet

1
Try running this in Package Manager Console - Get-Help EntityFramework That would show you all EF commands available. In rare case, you may have ended up in incorrectly executed init script. Does uninstalling & re-installing the tools package help?Smit
I ran it. It only shows 4 basic commands. Script-Migration is not part of the 4dfmetro
Which version of EF are you using?Smit
Entity Framework Core Version 1.1.2.dfmetro
Try this. Create new Console App, install EF tools package in it and run Get-Help EntityFramework if you see Script-Migration there then it will be project issue rather than machine issue.Smit

1 Answers

0
votes

After upgrading from Entity Framework Core 1.1. to Entity Framework Core 2.0 I can access the command.