I got this error recently while updating a project that I’m working on. It had been ported from WinForm to .Net Core 3.0, and worked fine - but suddenly I started getting errors where it claimed to not know what Form was. The output showed the error:
The “LegacyFrameworkPackages” parameter is not supported by the “ResolveFrameworkReferences” task
Unbeknownst to me, MS have changed the namespace for desktop apps; where previously your csproj might look like this:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<LangVersion>8.0</LangVersion>
<NullableReferenceTypes>true</NullableReferenceTypes>
<AssetTargetFallback>uap10.0.18362</AssetTargetFallback>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
It now needs to look reference the WindowsDesktop SDK:
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">