Open Rick-Anderson opened 1 year ago
Leaving a note here to mention the new behavior in the <IsTrimmable>true</IsTrimmable>
part of https://learn.microsoft.com/dotnet/core/deploying/trimming/prepare-libraries-for-trimming.
I'm adding a breaking change notice that mentions multi-targeting: https://github.com/dotnet/docs/pull/36775. We still need a dedicated section in the general trimming docs though. When that's added, we should also link to it from the breaking change notice.
See this comment copied below
Finally, recently we've learned that multi-targeting is not only very common, but basically a must have when enabling trimming. (This is based on experience trying to make some NuGets trim compatible). I think the document should have a section about the multi-targeting and our recommendations around it. But the core point is that very few libraries will only target latest TFM. By far the most common case is either library targets
netstandard2.0
or it multi-targetsnet472
,netstandard2.0
andnet6.0
(or some combination of these).Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.