microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

Microsoft-UI-Xaml V2.8 conflict with Microsoft.Toolkit.Uwp.UI.Controls V7.1.2

Open OneFingerCodingWarrior opened this issue 3 years ago • 7 comments

Describe the bug

1、After Update to V2.8, got the following error PRI175: 0x80073b0f - Processing Resources failed with error: Duplicate Entry. 2、V2.7.1 works fine

Steps to reproduce the bug

Please compile the attachment project

Expected behavior

No response

Screenshots

No response

NuGet package version

Microsoft.UI.Xaml 2.8.0

Windows app type

  • [X] UWP
  • [ ] Win32

Device form factor

Desktop

Windows version

Windows 10 (20H2): Build 19042

Additional context

App3.zip

OneFingerCodingWarrior avatar Jul 19 '22 08:07 OneFingerCodingWarrior

this often happens with version mismatch of dependencies. Toolkit is using 2.7, so the version needs to be increase in toolkit. Raise an issue there

MagicAndre1981 avatar Jul 21 '22 16:07 MagicAndre1981

The problem is if Microsoft.Toolkit.Uwp.UI.Controls is referenced in the main project , everything is fine. And error arise only when it is referenced in a class library . Maybe i should wait Toolkit update dependencies to WinUI 2.8, and then try again.

OneFingerCodingWarrior avatar Jul 21 '22 22:07 OneFingerCodingWarrior

One more question: if Toolkit is targeting 2.7, why 2.71 is fine, but 2.8.0 is not ?

OneFingerCodingWarrior avatar Jul 22 '22 07:07 OneFingerCodingWarrior

The problem is if Microsoft.Toolkit.Uwp.UI.Controls is referenced in the main project , everything is fine. And error arise only when it is referenced in a class library . Maybe i should wait Toolkit update dependencies to WinUI 2.8, and then try again.

I also have the same issue. It's also fine on 2.7.2 just 2.8 having the issue. I also have the following error too on 2.8, however, 2.7.x versions are fine. PRI277: 0x80073b0f - Conflicting values for resource 'Files/Microsoft.UI.Xaml/DensityStyles/Compact.xbf'

NGame1 avatar Jul 23 '22 19:07 NGame1

I suspect that @MagicAndre1981 is right, and the issue is that WCT is still pointing to 2.7.1. @michael-hawker, do you agree?

krschau avatar Jul 25 '22 17:07 krschau

One more question: if Toolkit is targeting 2.7, why 2.71 is fine, but 2.8.0 is not ?

I have no idea, I just remember that this error occurred in the past if version mismatches occurred for Xamarin.Forms or Microsoft.NETCore.UniversalWindowsPlatform

MagicAndre1981 avatar Jul 26 '22 21:07 MagicAndre1981

Microsoft.NETCore.UniversalWindowsPlatform

I'm using Microsoft.NETCore.UniversalWindowsPlatform 6.2.14 on main project and class libraries.

NGame1 avatar Jul 26 '22 21:07 NGame1

👋 After some investigation, I found that this issue is still present when the Community Toolkit is removed from the equation.

It can be reproduced using only class libraries and the Microsoft.UI.Xaml nuget package: image

After additional testing, the issue will go away if either of these conditions are met:

  • The Microsoft.UI.Xaml version used in the transitive dependency matches the version used in the referencing project.
  • Or, explicitly install the Microsoft.UI.Xaml package version you'd like to you in the project that references the problematic package/project with a reference to a lower version (install to ClassLibraryWithWinUI28 in the screnshot above)

Since this issue can be reproduced without the Toolkit, we're recommending a workaround for developers and handing this back to the WinUI team from here.

Arlodotexe avatar Aug 24 '22 22:08 Arlodotexe

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jul 29 '23 16:07 github-actions[bot]

Just bumped in to this, as soon as i reference Microsoft.Toolkit.Uwp.UI.Controls Main project and Class Library i get PRI175: 0x80073b0f - Processing Resources failed with error: Duplicate Entry.

omg 4 hours to waste because of this

EDIT: seems happens if Microsoft.Toolkit.Uwp.UI.Controls installed without Microsoft.UI.Xaml in Class Library project

antokhio avatar Apr 18 '24 19:04 antokhio