The “LegacyFrameworkPackages” parameter is not supported by the “ResolveFrameworkReferences” task

June 18, 2019

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:

[code lang=“xml”] <Project Sdk=“Microsoft.NET.Sdk”>

       WinExe     netcoreapp3.0     8.0     true          uap10.0.18362     true   




It now needs to look reference the WindowsDesktop SDK:

[code lang="xml"]
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">



Profile picture

A blog about one man's journey through code… and some pictures of the Peak District
Twitter

© Paul Michaels 2022