whistyun / Markdown.Avalonia

render markdown with Avalonia UI
MIT License
291 stars 22 forks source link

When change target to net6.0-macos, app fails to load assembly System.ComponentModel.EventBasedAsync 6.0.0 #87

Open lanyusan opened 1 year ago

lanyusan commented 1 year ago

I have an app under development that uses your extension. It works great when the target framework is generic net6.0. When I change the target framework to net6.0-macos, following exception was thrown during run time.

image

When I comment out the code that uses markdown, the exception was gone.

Is there any workaround for this?

Thanks.

jonthysell commented 1 year ago

Are you trimming your output? Try the following in your csproj to make sure the assembly doesn't get trimmed:

<ItemGroup>
  <TrimmerRootAssembly Include="System.ComponentModel.EventBasedAsync" />
</ItemGroup>