Same type-name exists in both Aero and Aero2

Snorvarg 6 Reputation points

I am updating several projects from .net framework 4.7.2 to .net6, using the excellent upgrade-assistant tool. Sometimes I get this error:

Error CS0433 The type 'SystemDropShadowChrome' exists in both 'PresentationFramework.Aero, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' and 'PresentationFramework.Aero2, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

This always happens with .xaml-files, and always with the Aero and Aero2 packages. These are both referenced by the Microsoft.WindowsDesktop.App.WPF (C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\6.0.4) framework, which upgrade-assistant adds to my project when upgrading.

I can't remove the Microsoft.WindowsDesktop.App.WPF framework from my project, of course, but reading about the error CS0433 hints me there should be a way to choose between the packages. Except I cannot find out how to..

Anyone able to help me out?

Cross-posted here:

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,710 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,641 questions
{count} votes