Skip to content

MarkdownTextBlock component cannot function properly when AOT is enabled. #780

@XTY64XTY

Description

@XTY64XTY

Describe the bug

When I use code to dynamically create a MarkdownTextBlock, the entire program crashes, and the exception is not caught by the default settings of VS 2026.
Image
When I turn off AOT, the program works normally.

Steps to reproduce

1. Enable AOT in the project
2. Use the MarkdownTextBlock component

Expected behavior

If everything is normal, MarkdownTextBlock should work properly.

Screenshots

Image

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 11 21H2 (Build 22000)
  • Other (specify)

Other Windows Build number

26200.7840

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

26100.7705

Visual Studio Version

No response

Visual Studio Build Number

18.3.0

Device form factor

Desktop

Additional context

No response

Help us help you

No, I'm unable to contribute a solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't workingnativeaotThe dependency on dotnet NativeAOT

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions