-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Description
Summary
This is a big effort to help with better trimming of the library with the goal of reducing the size of a published app.
There are some design choices we've made which make it hard to trim unused code (broadly, anything that uses reflection)
As part of this effort those designs should be reviewed to see whether we can find better alternatives.
People with more context
@davidfowl, @halter73, @javiercn, @captainsafia
Motivation and goals
This is part of a bigger plan to make the higher level frameworks trimmable (see dotnet/runtime#43543).
We also want to make sure people can host web servers as part of cloud infrastructure as small single file executables.
Longer term, we want to make sure that ASP.NET Core can work in full AOT mode without reflection and this is the first stage of that journey.
In scope
We want to make sure we can trim ASP.NET Core applications with confidence by default. Our target for .NET 6 is APIs only. This includes:
Out of scope
We're not going to focus on applications with Web Applications at the moment. Web Applications with Razor views won't be explicitly trimmable in .NET 6.
Risks / unknowns
Testing is one of the really hard things to cover when doing linking. To get 100% coverage you need to basically re-run all of the tests with the appropriate code linked.