Our great sponsors
-
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.
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
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.
Related posts
- NH: Unity OSS Open Context Circle Menu in Your Secen View
- Nephalem's nightmare. Exploring errors in Diablo 3 server emulator code
- Show HN: See your currently playing Spotify song in the menu bar
- The software industry rapidly convergng on 3 languages: Go, Rust, and JavaScript
- The Rise and Fall of the LAN Party