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:
In trying to solve dependency issues between visual studio, .NET 6 and the different nuget packages I've tried:
- scaling down versions of visual studio from community 17.10.5 to professional 17.3.7 to target .NET 6
- scaling down versions of sql server from 2022 to 2019 (and subsequent drivers - ODBC Driver 17 at the moment)
- downloading .NET 6 (SDK 6.0.424)
- upgrading and downgrading different versions of the nuget packages (6.0.21 was deemed stable when I first did the project a few months back), but to no avail.