After distribution, I unpack my apk file and try to decompile the libraries
In ILSpy i get this error:
// This file does not contain a managed assembly.
In de4dot:
WARNING: The file isn't a .NET PE file
csproj file:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
<BundleAssemblies>false</BundleAssemblies>
<AndroidUseAapt2>true</AndroidUseAapt2>
<AndroidDexTool>d8</AndroidDexTool>
<AndroidPackageFormat>apk</AndroidPackageFormat>
<AndroidCreatePackagePerAbi>false</AndroidCreatePackagePerAbi>
<AndroidSupportedAbis />
This is due to the Xamarin.Android update
Managed assemblies are now compressed by default for Release configuration builds, resulting in significantly smaller APK and Android App Bundle sizes. Assemblies are compressed with the LZ4 algorithm during builds and then decompressed on device during app startup.
For a small example Xamarin.Forms application, this reduced the APK size from about 23 megabytes to about 17 megabytes while only increasing the time to display the first page of the app from about 780 milliseconds to about 790 milliseconds.
If needed, the new behavior can be disabled for a particular project by opening the project file in Visual Studio or another text editor and setting the AndroidEnableAssemblyCompression MSBuild property to false in the .csproj file:
<PropertyGroup>
<AndroidEnableAssemblyCompression>false</AndroidEnableAssemblyCompression>
</PropertyGroup>
Source: https://github.com/xamarin/xamarin-android/releases/tag/v11.0.0.3