Self-contained apps are cool in #dotnet. You can bundle runtime and framework with the app. The downside is the size.

To resolve the size problem you can use app trimming.

.NET 5 introduces multiple options to trim the app.

1/4 🧵

#coding #devcommunity
The assembly-level trimming leaves only used assemblies in the app.

TrimMode=CopyUsed is default when using PublishTrimmed=true.

Result: 10.8 MB.

2/4
The member-level trimming is more aggressive. It removes types and members that are not used.

⚠️ It's an experimental feature. It's not ready for mainstream use.

Result: 2.58 MB.

3/4
R2R is ReadyToRun, an AOT technology that native compiles at build time for faster app startup.

It's a tradeoff between performance and size.

Result with assembly-level trimming: 12.9 MB.
Result with member-level trimming: 5.66 MB.

4/4

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Oleg Kyrylchuk

Oleg Kyrylchuk Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @okyrylchuk

1 Sep
🧵A thread of System.Text.Json features in the .NET 5.

Nine tweets with examples 🤓

Retweets are appreciated 🙏

#dotnet #coding #devcommunity #json #programming
Preserve references and handle circular references.
Read 10 tweets
22 Aug
All my 26 tweets about Entity Framework Core 5.0 features in one thread for better accessibility 🧵

It's not a complete list, more features you can find by the link below 👇

Retweets are appreciated 😊

#dotnet #efcore #coding #DEVCommunity
docs.microsoft.com/en-us/ef/core/…
Read 28 tweets
25 Jul
I've been tweeting every single day about C#9 features for 20 days.

I've gathered all my tweets in one thread.

Also, I've published all examples from my graphics to GitHub. Feel free to play with code github.com/okyrylchuk/csh…

Retweets are appreciated 😊

#dotnet #csharp
Read 21 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(