Snorvarg-8336 avatar image
0 Votes"
Snorvarg-8336 asked HuiLiu-MSFT commented

Same type-name exists in both Aero and Aero2

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:

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@Snorvarg-8336, Welcome to Microsoft Q&A, based on your description, I still need some information to reproduce your problem. What is your current app, wpf or uwp? Could you provide some references you are using in the .net framework app?

0 Votes 0 ·

Hello Jack, here is a small summary:

  • It is a wpf application
    • I have converted the project from .net framework 4.7 to .net6 using the upgrade-assistant command line tool.

    • The upgrade-assistant added a reference to the Microsoft.WindowsDesktop.App framework, which in turn is referencing both PresentationFramework.Aero and Aero2.

I added a screendump with the included Frameworks and Packages:

0 Votes 0 ·
references.png (15.7 KiB)

@Snorvarg-8336 . You could try to see if the solutions here work for you.

0 Votes 0 ·

0 Answers