Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BindingPlugins trim warning is too broad #17974

Open
stevemonaco opened this issue Jan 14, 2025 · 0 comments
Open

BindingPlugins trim warning is too broad #17974

stevemonaco opened this issue Jan 14, 2025 · 0 comments
Labels

Comments

@stevemonaco
Copy link
Contributor

Describe the bug

When using trimming and NativeAOT, there is a trim warning when accessing BindingPlugins.DataValidators.

To Reproduce

Untested, but should happen when creating a new Mvvm Toolkit project from templates.

Relevant project settings:

<PropertyGroup Label="AOT-related">
  <PublishTrimmed>true</PublishTrimmed>
  <PublishAot>true</PublishAot>
  <IsTrimmable>true</IsTrimmable>
  <EnableTrimAnalyzer>true</EnableTrimAnalyzer>
  <EnableAotAnalyzer>true</EnableAotAnalyzer>
  <EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
  <TrimmerSingleWarn>false</TrimmerSingleWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="AOT Release">
  <DebugSymbols>False</DebugSymbols>
  <DebugType>None</DebugType>
  <TrimmerRemoveSymbols>true</TrimmerRemoveSymbols>
</PropertyGroup>

Project is located at https://github.com/stevemonaco/AvaloniaViewModelFirstDemos/tree/master/AvaloniaCommunityToolkitAot

Expected behavior

No trim warning.

Avalonia version

11.2.3

OS

Windows

Additional context

[RequiresUnreferencedCode(TrimmingMessages.PropertyAccessorsRequiresUnreferencedCodeMessage)]
public static class BindingPlugins

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant