Replies: 1 comment 3 replies
-
We've done multitargeting and I'd rather not go there again :) But replacing .NET Standard with .NET 6 seems like a good idea to me. That would be a major version bump and I think we should release 12.0.1 first. cc @jbogard. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've recently run into an issue with AutoMapper related to assembly trimming. Even though AutoMapper itself isn't marked
IsTrimmable
, it depends on libraries marked as such (in the issue I experienced, it's theSystem.Runtime
assembly).The proper way to solve this problem is to annotate the library with trimmer-specific attributes following the Prepare .NET libraries for trimming guide. I would like to help out with that.
The attributes shown in that guide (eg.
DynamicallyAccessedMembers
,RequiresUnreferencedCode
) are only compatible on .NET 5 and above. AutoMapper currently only targetsnetstandard2.1
. Would it be possible to also targetnet6.0
for the library? I tried a localBuild.ps1
and it seemed to work fine with some minor tweaks.Since the attributes are unavailable on
netstandard2.1
, they need to be put in betweenNET6_0_OR_GREATER
, which does look a bit ugly:Beta Was this translation helpful? Give feedback.
All reactions