I am very new to EntityFramework development, not to mention to .NetCore and MVC design pattern, I actually started with .NetCore development with a introduction book to those subjects, I reached a chapter where the autor starts with an MVC project (still using .NetCore 2.0) and do Scaffolding to create the EF model based on a Database previously created, then he jumps to add a controller via wizard, chosing the option that says: "MVC Controller with views, using Entity Framework", but when I do this, a get the error:
"There was an error running the selected code generator: ' Failed to update dependency information for the project. Please restore the project and try again."
I tried adding this files manually and detected that this happens when I try (or the wizard tries) to create the view file, either using an empty template or using one of the models, the result is the same. I thought it was for the NuGet packages that where "asking" for updates, so I updated them, but nothing changed, I recreated the project several times, trying to leave the NuGet packages versions that the autor mentions to install, and to have "everything up to date" but still got the same.
I found another question in here with the same problem, and tried the possible solutions that mentions there, but none worked for me, I even try to install the versions 2.0.0 (or the lowest if there where no version 2.0.0) of the NuGet packages needed (or rather, mentioned by the author), and there was a change, still an error, but a different one, that says that the Microsoft.AspNetCore.Razor.Design.targets file needs a value on Configuration...?, still not know what to do, I noticed that updating 3 packages eliminates this error but is going back to the views error.
I don't know what else can I do or how to address this problem.
Microsoft.VisualStudio.Web.CodeGeneration.DesignNuGet installed. Make sure you have that, if you don't already. Then try doing adotnet restoredirectly from the command line. Also, ensure that your solution builds successfully. If any projects are failing their builds, that will affect the scaffolding from working successfully.dotnet restoreand got the same error, the project builds correctly and that package is installed, is one of the package the autor mentions to install after creating the project.