Skip to content

<PublishAot> prevents AXAML previewer from working #19

Description

@MikeyWetzel

A fresh git clone and build of the solution in VS2022 results in none of the .axaml files working in the preview. The error shown is "Dynamic code generation is not supported on this platform."

I did a google search and found AvaloniaUI/Avalonia#13760 where a commenter suggested: "Well, previewer cannot be supported with PublishAot binaries, as AOT doesn't support dynamic code which is essential for the previewer."
I can verify the following suggestion did fix the problem. That fix is to add this line in Solitaire.Desktop.csproj:

	<PublishAot Condition="'$(Configuration)' != 'Debug'" >true</PublishAot>

Result: axaml files new appear at design time.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions