Since version 11.1.1, however, the Visual Studio previewer throws the following exception:
21:11:01.917 [Information] Started AvaloniaDesigner.CreateCompletionMetadataAsync() for "...REDACTED.dll"
21:11:01.918 [Information] Starting previewer process for '"...REDACTED.dll"'
21:11:01.921 [Information] 22576 Started previewer process for '"...REDACTED.dll"'. Waiting for connection to be initialized.
21:11:01.991 [Information] 22576 Connection initialized
21:11:02.830 [Error] 22576 UpdateXamlResult error
System.Xaml.XamlException: Unable to cast object of type 'Avalonia.Markup.Xaml.MarkupExtensions.DynamicResourceExtension' to type 'Avalonia.Media.IBrush'.
21:11:19.807 [Information] 22576 Stopping previewer process
21:11:19.807 [Information] Process exited
Describe the bug
In Avalonia 11.0.12, you could include
DynamicResource
elements in aResourceDictionary
to create aliases:Since version 11.1.1, however, the Visual Studio previewer throws the following exception:
To Reproduce
Use the AXAML above.
Expected behavior
No response
Avalonia version
11.1.1, 11.1.2, 11.1.3
OS
Windows
Additional context
Visual Studio 2022 17.11