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

FastDev should alter $(RuntimeIdentifiers) for connected device #5374

Closed
jonathanpeppers opened this issue Dec 4, 2020 · 2 comments
Closed
Assignees
Labels
Area: App+Library Build Issues when building Library projects or Application projects.
Milestone

Comments

@jonathanpeppers
Copy link
Member

Right now in .NET 6 an empty app builds for two architectures:

dotnet new android
dotnet build

This produces a Debug .apk for arm64-v8 and x86 that would run on most devices/emulators.

If you have an x86 device selected in Visual Studio, we should have some behavior that will:

  1. Clear $(RuntimeIdentifiers) plural
  2. Set a single $(RuntimeIdentifier) matching the connected device

We already have similar behavior for "legacy" Xamarin.Android, but not .NET 6.

This would speed up build times for Debug builds in .NET 6.

@jonathanpeppers jonathanpeppers added the Area: App+Library Build Issues when building Library projects or Application projects. label Dec 4, 2020
@jonathanpeppers jonathanpeppers added this to the One .NET milestone Dec 4, 2020
@jonathanpeppers jonathanpeppers self-assigned this Dec 4, 2020
@dellis1972
Copy link
Contributor

@jonathanpeppers how early on in the build process will GetPrimaryCpuAbi need to run in .net 6 for us to be able change RuntimeIdentifiers ?

@jonathanpeppers
Copy link
Member Author

I think as long as $(RuntimeIdentifier) and $(RuntimeIdentifiers) are updated before this target runs:

https://github.com/xamarin/xamarin-android/blob/549f2ced9e9c88cb8d7c1599d8e974976e90eb9d/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.AssemblyResolution.targets#L44-L48

We probably want to clear $(RuntimeIdentifiers) plural and set a single $(RuntimeIdentifier).

@ghost ghost locked as resolved and limited conversation to collaborators Jun 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area: App+Library Build Issues when building Library projects or Application projects.
Projects
None yet
Development

No branches or pull requests

2 participants