Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 of 14 tasks
NGame1 opened this issue Jul 23, 2022 · 20 comments
Closed
1 of 14 tasks
Assignees
Labels
external ⤴️ Requires an update to an external dependency or due to code outside the Toolkit. question ❔ Issues or PR require more information

Comments

@NGame1
Copy link

NGame1 commented Jul 23, 2022

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?

  • 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.

@NGame1 NGame1 added the bug 🐛 An unexpected issue that highlights incorrect behavior label Jul 23, 2022
@ghost ghost added the needs triage 🔍 label Jul 23, 2022
@ghost
Copy link

ghost commented Jul 23, 2022

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 🙌

@LalithaNadimpalli
Copy link
Contributor

Can you share the reproduce of the issue. I have trouble opening the reproduce shared on Xaml UI GitHub

@NGame1
Copy link
Author

NGame1 commented Jul 26, 2022

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.

@Arlodotexe
Copy link
Member

Arlodotexe commented Jul 26, 2022

@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.

@NGame1
Copy link
Author

NGame1 commented Jul 26, 2022

@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.

@Arlodotexe
Copy link
Member

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.

@OneFingerCodingWarrior
Copy link

OneFingerCodingWarrior commented Jul 27, 2022

I can repro the issue on new project with my two computers.
image
image

Microsoft.NETCore.UniversalWindowsPlatform 6.2.14
Microsoft Visual Studio Community 2022 (64-bit) - Current
Version 17.2.5

@OneFingerCodingWarrior
Copy link

OneFingerCodingWarrior commented Jul 27, 2022

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

@NGame1
Copy link
Author

NGame1 commented Jul 27, 2022

I can repro the issue on new project with my two computers. image image

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.

@MagicAndre1981
Copy link

what happens if you add Microsoft-UI-Xaml 2.8 to the class lib?

@NGame1
Copy link
Author

NGame1 commented Jul 27, 2022

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
image

@MagicAndre1981
Copy link

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 🤔

@NGame1
Copy link
Author

NGame1 commented Jul 27, 2022

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?

@NGame1
Copy link
Author

NGame1 commented Jul 27, 2022

@MagicAndre1981 I checked the NuGet package also

image

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.

@MagicAndre1981
Copy link

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

@OneFingerCodingWarrior
Copy link

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

@OneFingerCodingWarrior
Copy link

OneFingerCodingWarrior commented Jul 28, 2022

@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

@MagicAndre1981
Copy link

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

@michael-hawker
Copy link
Member

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:

image

@michael-hawker michael-hawker added this to the 7.1.3 milestone Aug 9, 2022
@Arlodotexe Arlodotexe self-assigned this Aug 24, 2022
@Arlodotexe
Copy link
Member

Arlodotexe commented Aug 24, 2022

👋 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 (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.

@michael-hawker michael-hawker added question ❔ Issues or PR require more information and removed bug 🐛 An unexpected issue that highlights incorrect behavior need more info 📌 labels Aug 24, 2022
@michael-hawker michael-hawker added the external ⤴️ Requires an update to an external dependency or due to code outside the Toolkit. label Aug 24, 2022
@michael-hawker michael-hawker removed this from the 7.1.3 milestone Oct 18, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Dec 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
external ⤴️ Requires an update to an external dependency or due to code outside the Toolkit. question ❔ Issues or PR require more information
Projects
None yet
Development

No branches or pull requests

6 participants