According to documentation, you should create a different kind of projects: “Windows Forms App (.NET Framework)”.
Windows Forms Database Project Problem with Data Sources
I am trying to setup the example Windows Forms SampleDatabaseWalkthrough example in Microsoft document
https://learn.microsoft.com/en-us/visualstudio/data-tools/create-a-sql-database-by-using-a-designer?view=vs-2019#add-a-data-source. However, when I try to open the Data Sources window as indicated in the instructions, I get the message:
This window is not supported for the selected project. For steps to enable data binding, please visit:
https://aka.ms/WinForms/DataBinding
However, that page has a large number of links that would seem to take forever to read. Could you give me a more direct answer to the project. Here is a copy of the project file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<LangVersion>9.0</LangVersion>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
</Project>
I have already created the SampleDatabase MDF and LDF files.