I was following Entity framework tutorial in Microsoft.
Here I've done up to Set up EF to use a SQL Server Express LocalDB database .And in Creating a Student Controller and Views section when I tried to add a controller using MVC 5 Controller with Views, using Entity Framework (as mentioned in the tutorial), I'm getting an error saying
Attempting to install version '6.1.1' of 'EntityFramework' but the project already includes a different version. Skipping...
I tried reinstalling Entity Framework using the console, but still, it doesn't solve the problem. Does anyone know how to solve it?
Try to uninstall Entity Framework an then reinstall it
Uninstall-Package EntityFramework -Force
Install-Package EntityFramework
Run this command in Package manager console:
Uninstall-Package EntityFramework -Force
then close visual studio and delete entity framework floder in packages.config
again open Visual Studio and run this command:
Install-Package EntityFramework
Recently run into the same error.
Resolved it by uninstalling all the ef core packages through Nuget package manager and re-installing them with the latest stable version (5.0.9)
I have re-installed following ef core packages
Note: Don't forget to rebuild the solution
See below screenshot
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.