Two steps to builder a .NET Trimmer application

This page summarizes the projects mentioned and recommended in the original post on /r/csharp

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Zack.DotNetTrimmer

  • Ten days ago, I published an open-source program for trimming .NET Core applications, which is Zack.DotNetTrimmer. Compared with. NET Core built-in trimmer, Zack.DotNetTrimmer not only can compresses more, but also supports WPF and WinForm. The repository is https://github.com/yangzhongke/Zack.DotNetTrimmer

  • AsmResolver

    A library for creating, reading and editing PE files and .NET modules.

  • However, according to Washi1337, author of AsmResolver (an open source project similar to DnLib), the NativeWrite method tries to preserve the structure of the native code so that the assembly size cannot be reduced. Instead, it may even increase the size of the assembly (see https://github.com/Washi1337/AsmResolver/issues/267). And in the actual use, I found that after modifying these assemblies, the program would fail to start. Checking the Windows event log, I found that it was caused by CLR startup failure. According to Washi1337, if only the native code in the assembly contains ReadyToRun, we can simply remove the ILLibrary flag from the assembly. After all, the optimized assembly still preserves the original IL code. However, after I did what Washi1337 said, the program still failed to start. It is not clear why, because the assembly containing native code can not be tailored well, so I did not go into further research, welcome friends who are proficient in CLR to share experience.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts