Same type-name exists in both Aero and Aero2

Snorvarg 6 Reputation points
2022-05-09T09:15:01.793+00:00

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=6.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' and 'PresentationFramework.Aero2, Version=6.0.2.0, 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: https://stackoverflow.com/questions/72138621/same-type-name-exists-in-both-aero-and-aero2

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,667 questions
C#
C#
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,205 questions
{count} votes