I installed EntityFrameworkCore.Design running the following.
Install-Package Microsoft.EntityFrameworkCore.Design -Version 3.0.0-preview6.19304.10
It seems to be installed and I can see the following in VS.
However, when I try to create a migration using
dotnet ef migrations add Init
I get quite some time waiting followed by the error below.
Your startup project 'Web' doesn't reference Microsoft.EntityFrameworkCore.Design. This package is required for the Entity Framework Core Tools to work. Ensure your startup project is correct, install the package, and try again.
When I checked the Web.proj file, I get to see the following section.
<ItemGroup> <PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="3.0.0-preview6.19307.2" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.0.0-preview6.19304.10"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> </PackageReference> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0-preview6.19304.10" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc2" /> <PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="5.0.0-rc2" /> </ItemGroup>
How can I ensure that the computer sees the package?
You will need to refer additional packages for Migrations to work, add:
Add it to the project that has data context.