You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Surfaced by IsAotCompatible=true on Weasel.Core (landed in Weasel 9.0 foundation):
warning IL2075: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties' in call to 'System.Type.GetProperties()'. The return value of method 'System.Object.GetType()' does not have matching annotations.
This is reflective property enumeration on an arbitrary object instance. Two paths:
Annotate the consuming method's generic type parameter (or the parameter being inspected) with [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] so the trimmer preserves the necessary metadata.
Replace the reflective enumeration with a source-generator-emitted accessor for known types (longer-term, aligns with the source-generator-first direction of the Critter Stack 2026 wave).
Path 1 is the minimum-blast-radius fix; path 2 is the longer-term answer.
Adds [DynamicallyAccessedMembers(PublicProperties)] on the parameters argument of AddParameters(object) so the runtime contract ("the type you pass me must have its public properties preserved") is part of the caller-facing surface.
Adds [UnconditionalSuppressMessage("Trimming", "IL2075", ...)] on the method with a Justification documenting that the trimmer's flow analysis doesn't currently propagate the DAM annotation through object.GetType() — the runtime contract holds via the parameter annotation, just not the trimmer's static check at the GetType().GetProperties() call site.
xmldoc points at the source-generator path (path 2 in the issue) as the longer-term answer.
Activity
Resolve #261, #265, #266 — Core.CascadeAction overloads + AOT annotat…
jeremydmiller commentedon May 12, 2026
Resolved by PR #272 (merged into
9.0).Two-part fix per path 1 in the issue:
Adds
[DynamicallyAccessedMembers(PublicProperties)]on theparametersargument ofAddParameters(object)so the runtime contract ("the type you pass me must have its public properties preserved") is part of the caller-facing surface.Adds
[UnconditionalSuppressMessage("Trimming", "IL2075", ...)]on the method with a Justification documenting that the trimmer's flow analysis doesn't currently propagate the DAM annotation throughobject.GetType()— the runtime contract holds via the parameter annotation, just not the trimmer's static check at theGetType().GetProperties()call site.xmldoc points at the source-generator path (path 2 in the issue) as the longer-term answer.
Bump JasperFx to 2.0.0-alpha.11 + JasperFx.Events to 2.0.0-alpha.4
Bump JasperFx to 2.0.0-alpha.11 + JasperFx.Events to 2.0.0-alpha.4 (#273
Merge 9.0 into master — master is now the 9.0 development line (#277)
Add Weasel 8 → 9 migration guide (#276)