WindowsCommunityToolkit
WindowsCommunityToolkit copied to clipboard
Microsoft.Toolkit.Uwp.UI.Controls V7.1.2 conflict with Microsoft-UI-Xaml V2.8
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
Regression
No response
Reproducible in sample app?
- [X] This bug can be reproduced in the sample app.
Steps to reproduce
Please compile the attachment project
Expected behavior
Should compile without errors π
Screenshots
No response
Windows Build Number
- [ ] Windows 10 1809 (Build 17763)
- [ ] Windows 10 1903 (Build 18362)
- [ ] Windows 10 1909 (Build 18363)
- [ ] Windows 10 2004 (Build 19041)
- [ ] Windows 10 20H2 (Build 19042)
- [ ] Windows 10 21H1 (Build 19043)
- [ ] Windows 11 21H2 (Build 22000)
- [ ] Other (specify)
Other Windows Build number
No response
App minimum and target SDK version
- [ ] Windows 10, version 1809 (Build 17763)
- [ ] Windows 10, version 1903 (Build 18362)
- [ ] Windows 10, version 1909 (Build 18363)
- [ ] Windows 10, version 2004 (Build 19041)
- [ ] Other (specify)
Other SDK version
No response
Visual Studio Version
2022
Visual Studio Build Number
Microsoft Visual Studio Enterprise 2022 (64-bit) - Preview Version 17.3.0 Preview 4.0
Device form factor
Desktop
Nuget packages
Microsoft.Toolkit.Uwp.UI.Controls V7.1.2 Microsoft-UI-Xaml V2.8
Additional context
Same issue on Microsft Xaml UI Github
Help us help you
No.
Hello NGame1, thank you for opening an issue with us!
I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback π
Can you share the reproduce of the issue. I have trouble opening the reproduce shared on Xaml UI GitHub
To be honest, No. π Not because I don't want Because it's not happening on a dummy project I made π
But still, I have this issue with my main project. If you want I can provide you with a full build log. Is that helpful? But, I forget where was the option to set the output window log level.
@NGame1 Any additional information (like the build logs) is helpful, but the most helpful thing is a minimal repro.
Minimal repros allow us to diagnose the issue much faster and gives us assurance that it really is a bug with the Toolkit or Microsoft.UI.Xaml.
@Arlodotexe Nice to meet you here. Unfortunately, I don't know why it doesn't happen on a new project. I can send you the full project privately. It's happening on the next Winsta version, and the source code is not really minimal.
From MagicAndre1981 in the linked issue:
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
@LalithaNadimpalli Maybe this is part of the problem, we could try using this to repro the issue on our end.
I can repro the issue on new project with my two computers.
Microsoft.NETCore.UniversalWindowsPlatform 6.2.14 Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.2.5
Can you share the reproduce of the issue. I have trouble opening the reproduce shared on Xaml UI GitHub
It's just a simple new project with two nuget packages. I can download and open the project without any trouble. I upload the sample project again App3.zip
I can repro the issue on new project with my two computers.
![]()
Microsoft.NETCore.UniversalWindowsPlatform 6.2.14 Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.2.5
your screenshot helped me out in finding a workaround. Add all these dependencies in all projects (Just in those you need not really all class libraries) Microsoft.NETCore.UniversalWindowsPlatform 6.2.14 Microsoft.Toolkit.Uwp.UI.Controls V7.1.2 Microsoft-UI-Xaml V2.8
Adding one of them to the main project and the other one to the other class library pr project is the main cause of this problem.
what happens if you add Microsoft-UI-Xaml 2.8 to the class lib?
what happens if you add Microsoft-UI-Xaml 2.8 to the class lib?
I think that should be documented somewhere.
I didn't know that there's such dependency between these two NuGet packages.
Even, it's not mentioned here in NuGet dependencies
what happens if you add Microsoft-UI-Xaml 2.8 to the class lib?
I think that should be documented somewhere. I didn't know that there's such dependency between these two NuGet packages.
if it referenced it should appear as a dependency. Maybe nuspec generation bug ? Does adding it fixes it?
If not also try to add <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
to generate redirects so that references to 2.7 get redirected to 2.8 π€
what happens if you add Microsoft-UI-Xaml 2.8 to the class lib?
I think that should be documented somewhere. I didn't know that there's such dependency between these two NuGet packages.
if it referenced it should appear as a dependency. Maybe nuspec generation bug ? Does adding it fixes it?
If not also try to add
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
to generate redirects so that references to 2.7 get redirected to 2.8 π€
Yes, I added both NuGets to the Main project and class libraries, and the problem was fixed. @OneFingerCodingWarrior Can you test it and report if this workaround works for you too or not?
@MagicAndre1981 I checked the NuGet package also

The Microsoft-UI-Xaml >= 2.7.0 dependency didn't mention. Seems there's something going wrong with the build or NuGet package-making process.
this "PackageReference Include" is buggy when detecting dependencies so I install them on my own like in packages.config days to have full control over dependencies.
Nice to hear that you got it working
what happens if you add Microsoft-UI-Xaml 2.8 to the class lib?
I think that should be documented somewhere. I didn't know that there's such dependency between these two NuGet packages.
if it referenced it should appear as a dependency. Maybe nuspec generation bug ? Does adding it fixes it? If not also try to add
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
to generate redirects so that references to 2.7 get redirected to 2.8 π€Yes, I added both NuGets to the Main project and class libraries, and the problem was fixed. @OneFingerCodingWarrior Can you test it and report if this workaround works for you too or not?
It works for me too, thanks
@MagicAndre1981 I checked the NuGet package also The Microsoft-UI-Xaml >= 2.7.0 dependency didn't mention. Seems there's something going wrong with the build or NuGet package-making process.
Maybe WinUI 2.8.0 should responsible for the bug, because UI.Controls 7.1.2 is happy to work with WinUI 2.7.1γ Besides ,i don't want to install WinUI2.8 all over around
Besides ,i don't want to install WinUI2.8 all over around
but you should do it to prevent such issues. I had similar issues in the past and now install the dependencies on my own to fully control them
what happens if you add Microsoft-UI-Xaml 2.8 to the class lib?
I think that should be documented somewhere. I didn't know that there's such dependency between these two NuGet packages. Even, it's not mentioned here in NuGet dependencies
The Controls package is a meta package, if you look at the individual packages within them, then you'll see WinUI listed:
π 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:
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 (e.g., upgrading the Toolkit to 2.8) - 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 (the project that references the Toolkit, in this case).
Since this issue can be reproduced without the Toolkit, we'll hand this back to the WinUI team here.
We'll be able to update to WinUI 2.8 in the near future. For now, please install the specific version of Microsoft.UI.Xaml
you'd like to use alongside the toolkit, if it differs.