For those who do have this problem using Visual Studio 2022: Switch back to Visual Studio 2019, as it doesn't work yet in the 2022 version when you are using an older Entity Framework version.
On the [relevant issue file on the Entity Framework 6 GitHub repository][1],project member ajcvickers [commented on 2021-11-18][2] :
[...] 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.
[1]: https://github.com/dotnet/ef6/issues/1916
[2]: https://github.com/dotnet/ef6/issues/1916#issuecomment-972609832
For those who do have this problem using Visual Studio 2022: Switch back to Visual Studio 2019, as it doesn't work yet in the 2022 version when you are using an older Entity Framework version.
On the [relevant issue file on the Entity Framework 6 GitHub repository](https://github.com/dotnet/ef6/issues/1916), project member ajcvickers [commented on 2021-11-18](https://github.com/dotnet/ef6/issues/1916#issuecomment-972609832):
> [...] 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.