Difference in app size between Mac64 and MacOS targets #2375
-
Hi, I noticed today that there is significant size difference (10x) in the output between Mac64 and MacOS targets for the same project. For example, for an app based on the template with just a few changes, .app bundle for the Mac64 target is around 22MB, while for the MacOS target, it's around 218MB. Should it be that way? If so, what accounts for it? Or am I missing some optimization? Are there any reasons to go with the MacOS target over the Mac64 one? Thanks! Info: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I just compared it with an app built using the default net6.0 macapp template. One thing I figured out is that by default the Eto.Form macOS target builds a universal app that supports both Intel and Apple Silicon. The default net6.0 macapp template appears to build only the Intel one on my Intel Mac. Changing the Eto.Forms project to support one or the other reduces the size by about half, which makes it about the same as the default macapp template (around 104MB). I tried setting to true in both projects, but it didn't do anything in either. Running So I guess that's the size you get when targeting net6.0-macos. :) |
Beta Was this translation helpful? Give feedback.
-
Update: I discovered that trimming for net6.0-macos targets does work as long you actually set Using |
Beta Was this translation helpful? Give feedback.
Update:
I discovered that trimming for net6.0-macos targets does work as long you actually set
TrimMode
in the project file.Using
<TrimMode>Link<\TrimMode>
I've gotten the final size down to 45MB.