Skip to content

marshal-ilgen component should be optional #7276

@jonpryor

Description

@jonpryor

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:

  1. updating Mono.Androi.dll and Java.Interop.dll (and others?) to use the DllImport Generator.
  2. 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.

Metadata

Metadata

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.enhancementProposed change to current functionality.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions