Last post Nov 19, 2018 02:23 AM by Xing Zou
Nov 17, 2018 11:28 PM|ahmedbarbary|LINK
dotnet ef migrations add InitialMigration
No project was found. Change the current working directory or use the --project option.
why this error show to me
and how to solve it
I work in visual studio 2017 asp.net core 2.1
and my project file as following
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.6" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2" PrivateAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
Nov 17, 2018 11:53 PM|ahmedbarbary|LINK
It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.All', version '2.1.6' was not found.
- Check application dependencies and target a framework version installed at:
Nov 19, 2018 02:23 AM|Xing Zou|LINK
You need to run your command in project directory( which contains .csproj file).
1.In Solution Explorer, right-click the project and choose Open in File Explorer from the context menu.
2.Enter "cmd" in the address bar and press Enter.
3.Enter the following command in the command window:
dotnet ef migrations add InitialCreate
You could refer to below link to learn how to do migrations in EF core MVC: