Open
Description
Android application type
Android for .NET (net6.0-android, etc.)
Affected platform version
.NET 7
Description
With #7249 and #7260, the marshal-ilgen
component is always included into Android apps.
For .NET 8 (?), we should try to make inclusion of this component optional, such that it is included only if required.
As a prerequisite, this will require:
- updating
Mono.Androi.dll
andJava.Interop.dll
(and others?) to use theDllImport Generator
. - Updating the above assemblies to have
[assembly:DisableRuntimeMarshallingAttribute]
Then, we'd need to update the App Build process to scan all included assemblies, and if all included assemblies contain [assembly:DisableRuntimeMarshallingAttribute]
, then the marshal-ilgen
component can be removed from the .apk
.