I have issues creating a Controller with Scaffolding items.I'm working with Visual Studio 2019 - ASP.NET Core Web Application (with MVC) - ASP.NET Core 3.1
I did the following steps:
- I installed from Nuget Packages Manager:
- Microsoft.EntityFrameworkCore (3.1.3)
- Microsoft.EntityFrameworkCore.SQLServer (3.1.3)
- Microsoft.EntityFrameworkCore.Tools (3.1.3)
- I made a Model class
- I made a DB context class
- I added in the ConfigureServices method of Startup class the connection with the DB context and String connection
- In appsettings.json I added the String connection to SQLSERVER
- right-click on Controllers folder, Add > Controller. Then select ‘MVC Controller with views, using Entity Framework’, selected Model and DB Context but when it's creating the Controller and View the VS showed me an error "Package restore failed. Rolling back package changes for "Name of Project" "
I read other questions related to this, I delete the cache from the Nuget Packages, Rebuild project, change the version of the packages, etc, but the issue still happening.