How to create Entity Framework in Visual Studio for Windows Forms (.NET framework)

133 Views Asked by At

I have installed Visual Studio 2022 and created a "Windows Forms App (.NET framework)" project (target is .NET framework 4.8).

Then I installed Entity Framework v6.4.4 and Microsoft.SqlServer- 1.0.0 from NuGet Package Manager. Then I picked 'Add.Net Entity Data Model' through 'EF Designer from database' successfully. The problem comes when I build the solution for DataSource. Hence I am not able to add DataSource.

I tried the same thing on my old machine which has Visual Studio 2019. My .NET framework is 4.7.2.

Packages are EntityFramework-6.2.0 and Microsoft.SqlServer-1.0.0. I followed the same steps and my project is working completely fine. I have successfully added DBEntities. I believe Visual Studio 2022 doesn't support these packages. Can anyone help me with this please?

0

There are 0 best solutions below