How to minimize the size of a release build

Hi there,

I am trying to write an Win10/Linux Desktop application. Basically a fancy image viewer for a presentation. It will be quite minimal, but for the ease of control, C# and WYSIWYG I would love to use Xenko for it. So what bugs me at the moment is the rather big footprint of the release builds of sample applications. I would like my final program not to exceed 10 to 20 Mega.

  1. What can I do to reduce the size? What components can I strip of the basic build and how?

  2. Can the experienced here tell me, what’s the most minimal size of an application possible with Xenko, with all optimizations? (with content e.g.: white square on black ground)

Appreciate your help and hope it is possible to squeeze it down somehow.

1 Like

Could you tell us what is big?

  • The data subfolder? (compiled assets)
  • The binaries (dll, xml and pdb in the root folder)?

If it’s binaries, there is a few things you could do:

  • Delete .pdb and .xml (we should probably get rid of them automatically in “AppStore” build configuration, don’t think it’s the case yet)
  • If not enough, run Mono.Linker (to get rid of unused code)

If it’s asset, it probably depends on what you have (if textures, compress them or reduce their size, etc…)

That’s a good point to start. So I got rid of all xml and pdb files (should really be deleted on release build if not needed) and build for x86 only. I still get 16MB of total size on the DX10 build of the base project.

What’s the easiest way to do that under Windows/VS2015? Do I have to go with mkbundle or is there a newer, more native way? Do I have to actively build against Mono for that to work?

Thanks for your help!

1 Like

This page Mono Linker says Mono Linker is not released yet…

Mono.Linker is a standalone executable that works on any .NET binaries (no need for it to be built with Mono).

You might have to build it yourself from https://github.com/mono/mono/tree/master/mcs/tools/linker

Not sure how well it works on Xenko project (it might remove “too much” stuff).

When build for Android with xenko empty project., i found the result data subfolder in the apk file is so big , How can i custom exclude the xenko external package ?