Skip to content

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

Closed as not planned

Description

@4c65736975

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.

Activity

  1. michael-hawker commented on Nov 17, 2023

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

  2. JoeTomkinson commented on Nov 19, 2023

    @JoeTomkinson

    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?

  3. michael-hawker commented on Nov 20, 2023

    @michael-hawker
    Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requestedwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions