For VS2019 .NET Core 3.1:
- right-mouse click on the project and select Unload Project
- right-mouse click on the project and select “Edit foobar.csproj”
- Example of using WPF and Winforms in .NET Core 3.1: where I added the UseWPF and UseWindowsForms tags. Also I changed
Microsoft.NET.Sdk
toMicrosoft.NET.Sdk.WindowsDesktop
to be able to use also wpf.
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup Label="Globals">
<SccProjectName>SAK</SccProjectName>
<SccProvider>SAK</SccProvider>
<SccAuxPath>SAK</SccAuxPath>
<SccLocalPath>SAK</SccLocalPath>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
...
- save and right-mouse click on the project again and select Reload Project