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

Error CS0121 with CommunityToolkit.WinUI.UI.Controls #277

Closed
1 of 24 tasks
4c65736975 opened this issue Nov 16, 2023 · 3 comments
Closed
1 of 24 tasks

Error CS0121 with CommunityToolkit.WinUI.UI.Controls #277

4c65736975 opened this issue Nov 16, 2023 · 3 comments
Labels
question Further information is requested wontfix This will not be worked on

Comments

@4c65736975
Copy link

Describe the bug

There is no way to use 'EnqueueAsync' with CommunityToolkit.WinUI.UI.Controls and CommunityToolkit.WinUI.Controls.SettingsControls.

Error CS0121 The call is ambiguous between the following methods or properties: 'CommunityToolkit.WinUI.DispatcherQueueExtensions.EnqueueAsync(Microsoft.UI.Dispatching.DispatcherQueue, System.Action, Microsoft.UI.Dispatching.DispatcherQueuePriority)' and 'CommunityToolkit.WinUI.DispatcherQueueExtensions.EnqueueAsync(Microsoft.UI.Dispatching.DispatcherQueue, System.Action, Microsoft.UI.Dispatching.DispatcherQueuePriority)'

Steps to reproduce

You have to install CommunityToolkit.WinUI.Controls.SettingsControls and CommunityToolkit.WinUI.UI.Controls and try to use EnqueueAsync.

Expected behavior

Possibility to use this function with the possibility of using both packages, perhaps changing the namespace extension in this package or the possibility of downloading a version compatible with CommunityToolkit.WinUI.UI.Controls

Screenshots

No response

Code Platform

  • UWP
  • WinAppSDK / WinUI 3
  • Web Assembly (WASM)
  • Android
  • iOS
  • MacOS
  • Linux / GTK

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 10 21H2 (Build 19044)
  • Windows 10 22H2 (Build 19045)
  • 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)
  • Windows 10, version 2104 (Build 20348)
  • Windows 11, version 22H2 (Build 22000)
  • Other (specify)

Other SDK version

No response

Visual Studio Version

No response

Visual Studio Build Number

No response

Device form factor

No response

Additional context

No response

Help us help you

No, I'm unable to contribute a solution.

@michael-hawker
Copy link
Member

From the Release Notes:

🔥🐉 Note: Mixing and matching these new 8.0 packages with existing Windows Community Toolkit 7.x packages, especially UI controls, can lead to issues with the namespace changes and dependencies on common code (like the Visual Tree extensions). If there's something that we haven't yet ported but you need, open a discussion to let us know or claim it and contribute!

This isn't a supported scenario. You should migrate to what you need specifically from the Controls package to their 8,0 equivalents.

@michael-hawker michael-hawker added question Further information is requested wontfix This will not be worked on labels Nov 17, 2023
@JoeTomkinson
Copy link

JoeTomkinson commented Nov 19, 2023

From the Release Notes:

🔥🐉 Note: Mixing and matching these new 8.0 packages with existing Windows Community Toolkit 7.x packages, especially UI controls, can lead to issues with the namespace changes and dependencies on common code (like the Visual Tree extensions). If there's something that we haven't yet ported but you need, open a discussion to let us know or claim it and contribute!

This isn't a supported scenario. You should migrate to what you need specifically from the Controls package to their 8,0 equivalents.

Out of interest, how would we handle a scenario like upgrading everything to the 8.0 and trying to use the Markdown control from the 7.1.2 (WinUi) release (CommunityToolkit.WinUI.UI.Controls.Markdown). That's the same scenario listed above, the dependencies for the markdowntextblock install the UI namespace (7.1.2) and obviously we then get the namespace conflicts.

I had tried a couple of things such as implementing extern on the markdown package from 7.1.2 and even as far as creating a class library and manually throwing in all the relevant code from the markdown class library in 7.1.2 which I can get to compile but have the dreaded "xaml failed to parse" at runtime error which as we all know is about as much use as a wet paper bag (looking at you Microsoft).

I know your currently working on a new markdown control using the markdig parser, any rough eta on that at all?

@michael-hawker
Copy link
Member

@JoeTomkinson there's a PR in Labs for the new MarkdownTextBlock replacement here: CommunityToolkit/Labs-Windows#480

@4c65736975 4c65736975 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants