I've added a new .Net 6.0 project to my solution in VS2022. Installed the EntityFramework 6.4.4. with install-package entityframework
and now try to add a ADO.Net Entity Framework Model to the project. I get an error:
The project's target framework does not contain Entity Framework runtime assemblies. Please review the target framework information on the project's property page.
I've tried adding several other EF packages (which should not be necessary according to the documentation here: https://learn.microsoft.com/en-us/ef/ef6/fundamentals/install). I thought the problem was with my installation but I created a .Net 6.0 console application containing the problem and sent it to a colleague and he got the same message.
Also found this topic here: Adding Entity Framework Model on Visual Studio 2022 but there's no answer there.
Steps to reproduce:
- Create a .Net 6.0 Console application.
- Install the EF6 package using
install-package entityframework
from the package manager console window. - Right-click solution and choose 'Add' => 'Add item'.
- In the left pane click 'Data'.
- Choose 'ADO.Net Entity Framework Model.
- Click 'Add'.
The error appears: