C# Entity Framework Basics CRUD Operations Creating Entities

Mark Ramos
Mark Ramos
17,640 Points

Errors when loading this project

I used the link in the previous video to download this solution. I loaded the solution in Visual Studio and updated Entity Framework to its latest version (6.2.0). I've got a couple build errors right off the bat. Does looking at these shed any light on what I've done wrong or am missing?

Error CS1061 'object' does not contain a definition for 'SetInitializer' and no accessible extension method 'SetInitializer' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?) ComicBookLibraryManager C:\Users\Mark\source\repos\aspnet-comic-book-gallery-model\src\ComicBookLibraryManager\ComicBookLibraryManager\Data\Context.cs

Error CS1061 'object' does not contain a definition for 'Log' and no accessible extension method 'Log' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?) ComicBookLibraryManager C:\Users\Mark\source\repos\aspnet-comic-book-gallery-model\src\ComicBookLibraryManager\ComicBookLibraryManager\Data\Repository.cs

1 Answer

HIDAYATULLAH ARGHANDABI
HIDAYATULLAH ARGHANDABI
20,983 Points

Try to update from the package manager console to the most recent stable version. It will be fixed

Mark Ramos
Mark Ramos
17,640 Points

This didn't fix it, but for anyone else with issues, I got around it by deleting the project and re-uploading it. I updated from NuGet GUI again to the latest version, and it worked fine. Go figure.