For those who do have this problem using Visual Studio 2022, there are at least two fixes:
Switch back to Visual Studio 2019, as it doesn’t work yet in the 2022 version if you are using an older Entity Framework version.
Update Entity Framework to 6.4.4 to resolve it
On the relevant issue file on the Entity Framework 6 GitHub repository, project member ajcvickers commented on 2021-11-18:
[…] EF 6.2 doesn’t work. You will need to update to EF 6.4.4. We have so far been unable to reproduce this with EF 6.4.4.
While numerous users have reported upgrading to EF 6.4.4 resolves their problem, the issue is still open, as there are users who can’t downgrade to Visual Studio 2019 or upgrade Entity Framework, as those changes could break pipelines.