Design a site like this with WordPress.com
Get started

Package ‘EntityFramework 6.2.0’ was restored using ‘.NETFramework,Version=v4.6.1’ instead of the project target framework ”

Check the .Net versions of all your projects in the solution explorer. In my case, it was .Net 6.0.1 in 2 projects and .Net 6.2.0 in the 3rd project so I changed the version of the third project and it worked.

To do so:

  1. Right click the solution name in solution explorer.
  2. Select ‘Manage Nuget Packages for Solution’.
  3. Select ‘Microsoft.EntityFramewokCore’.
  4. On the Right Side, Check if all projects in the solution have same version, If not, uninstall the package for the project that has different and install the same version as the other projects.
  5. Clean and Rebuild the Solution.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: