[Solved] Your startup project ‘solution name’ 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.

Solution

I solved this error by rechecking the the following points

1) The Microsoft.EntityrameworkCore.Design is installed in to the project

The Microsoft.EntityrameworkCore.Design package has to be installed in to the project as shown in the below image

2) Select the correct Default project in package manager console window

Select the correct project window where database Context class is present, here in the below example

public class InCompareContext : DbContext
{
}

Summary

I solved the error by selecting the correct Default project where the Entity framework tools are installed.

Default image
Shivaraju M

Over 3+ years experience in IT industry, good knowledge in . Net-based Web applications, windows applications, web services, and SPAs. I have played
multiple roles related to technical delivery in multiple domains while working on over 10+ technologies. I am
currently focused on continuous improvement and agile project management.

Leave a Reply