Skip to content

Prepare .NET libraries for trimming: Add multi-targeting H2 with our recommendations #36730

@Rick-Anderson

Description

@Rick-Anderson

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-targets net472, netstandard2.0 and net6.0 (or some combination of these).


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Labels

dotnet-fundamentals/svcin-prThis issue will be closed (fixed) by an active pull request.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions