This issue occurs when we copy paste the entire code to the new file and we forget to change the name of namespace. After pasting the code to new file, change this line: namespace ProjectName.oldfolder to this one: namespace ProjectName.newfolder
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: Right click the solution name in solution explorer.Select 'Manage Nuget Packages... Continue Reading →