Jack
Jack

Reputation: 951

Clarifying the "Bundle assemblies into native code" option for xamarin

I'm considering the option "Bundle assemblies into native code" in the properties of my xamarin android project as below:

enter image description here

which has the description

bundles assemblies into a native shared library. This option protects managed assemblies from examination or tampering by embedding them in native binaries.

This seems like a great option to me. It makes my code harder to reverse engineer, and makes my apk file smaller as well. However, clearly there are reasons that this option isn't checked by default in Visual Studio.

The three cons I can guess at are:

  1. compile time,
  2. ability to run a profiler (which seems like a dead loss for xamarin anyway)
  3. potentially that this way of operating might affect error reporting if you're using some kind of utility like AppCenter.

I'm curious to know what the actual cons might be, and if there is a compelling reason not to have this option as the status quo?

Upvotes: 0

Views: 308

Answers (1)

Leo Zhu
Leo Zhu

Reputation: 14956

Perhaps as the official document says,there are two limitations.

  1. This option requires an Enterprise license

  2. This option is only available when Use Fast Deployment is disabled

But without Fast Deployment, Xamarin.Android has to build an APK every time there’s change in your project, regardless of size or scope. This feature allows “side-loading” of .NET assemblies to enable a much better experience.

Upvotes: 1

Related Questions