There was an error running the selected code generator: ‘Package restore failed. Rolling back package changes for ‘project’.’
Whilst working on an old Visual Studio 2022 asp.net core web API project, that uses the .NET 6 framework and the database first approach – albeit hosted on Azure, I’ve come to find that after adding needed nuget packages (Microsoft.EntityFrameworkCore [6.0.21], Microsoft.EntityFrameworkCore.SqlServer [6.0.21], Microsoft.EntityFrameworkCore.Design [6.0.21] and Microsoft.EntityFrameworkCore.Tools [6.0.21]) and scaffolding the database to the project (adds needed project models and the Db Context), I am unable to proceed, as I can’t add needed controllers to the project. Instead, I get hit with the error message in the title: