Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archiving apk using .net 7.0+ for android includes wrong platforms #15971

Closed
mosammo opened this issue Jul 3, 2023 · 5 comments
Closed

Archiving apk using .net 7.0+ for android includes wrong platforms #15971

mosammo opened this issue Jul 3, 2023 · 5 comments
Labels
area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging external platform/android 🤖 t/bug Something isn't working

Comments

@mosammo
Copy link

mosammo commented Jul 3, 2023

Description

[severity:I’m unable to use this version]
Archiving apk using .net 7.0 for android with “Target platform” “ARM64” produces large apk that includes assemblies of other platforms “X86” and “x64” which increases apk size considerably.

Expected behavior is to only include assemblies of the selected target platform. For example if we select “ARM32” it should not include other platforms like “ARM64”, “X86” and “x64”.

Latest visual studio 2022 17.6.2

Steps to Reproduce

simple steps:

  1. Create a maui project.
  2. Right click the project to select the properties change Target platform to “ARM64” under Build->General
  3. Build the project then archive apk.

To check it simply rename the apk as .zip file then open it and check folders “assemblies” and “bin” inside the apk. (please check attached screenshots)

Link to public reproduction project repository

https://github.com/mosammo/DotNetIssues

Version with bug

7.0.49

Last version that worked well

6.0

Affected platforms

Android

Affected platform versions

.net 7 for android

Did you find any workaround?

no

Relevant log output

No response

@mosammo mosammo added the t/bug Something isn't working label Jul 3, 2023
@mosammo
Copy link
Author

mosammo commented Jul 3, 2023

Example apk for platform "ARM64" including unselected platforms assemblies
large apk size due to including wrong platforms

@jsuarezruiz jsuarezruiz added platform/android 🤖 area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging labels Jul 3, 2023
@jsuarezruiz
Copy link
Contributor

cc @jonathanpeppers

@jsuarezruiz jsuarezruiz added this to the Backlog milestone Jul 3, 2023
@ghost
Copy link

ghost commented Jul 3, 2023

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@jfversluis
Copy link
Member

The reproduction is not using .NET MAUI at all, while this probably would apply to .NET MAUI too, the core is in .NET for Android. Moving it to the right repo.

@jfversluis
Copy link
Member

This issue was moved to dotnet/android#8165

@dotnet dotnet locked and limited conversation to collaborators Jul 4, 2023
@jfversluis jfversluis removed this from the Backlog milestone Jul 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging external platform/android 🤖 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants