Repository navigation
Improve "first run" build & run time inside VS #8662
Copy link
Copy link
Closed
Labels
Area: App+Library BuildIssues when building Library projects or Application projects.Issues when building Library projects or Application projects.enhancementProposed change to current functionality.Proposed change to current functionality.
Milestone
Description
Activity
- addedenhancementProposed change to current functionality.Proposed change to current functionality.Area: App+Library BuildIssues when building Library projects or Application projects.Issues when building Library projects or Application projects.
on Jan 22, 2024 - addedneeds-triageIssues that need to be assigned.Issues that need to be assigned.
on Jan 22, 2024 - changed the title
[-]Improve "first run" build & run time[/-][+]Improve "first run" build & run time inside VS[/+]on Jan 22, 2024 - removedneeds-triageIssues that need to be assigned.Issues that need to be assigned.
on Jan 24, 2024 - added a commit that references this issue
on Feb 12, 2024 - added a commit that references this issue
on Feb 13, 2024 - added a commit that references this issue
on Mar 11, 2024 This scenario is also improved by:
The current proposal is:
- The IDE sets a new value
-p:AdbTargetArchitecture - At this time, the emulator is closed,
adb devicesdoesn't report anything - The IDE doesn't have the value for
-p:AdbTargetat this time either
So, the build could:
- Skip
_GetPrimaryCpuAbiif$(AdbTargetArchitecture)is set - Set appropriate values for
$(RuntimeIdentifiers), etc.
By the time the IDE Deploys, or runs the
Installtarget:- Build is complete
- Emulator is running
Installwill be passed-p:AdbTargetas before, and passed-p:AdbTargetArchitecturefor completeness (this way_GetPrimaryCpuis skipped).
- The IDE sets a new value
/cc @dellis1972 @tondat
If the IDE knows what emulator it is going to launch before we do the build then this might work 👍
- added a commit that references this issue
on Aug 20, 2024 - moved this from Todo to Done in .NET 9 MAUI Performance, App Size, Inner Loop
on Sep 5, 2024 - locked and limited conversation to collaborators
on Oct 9, 2024
Metadata
Metadata
Assignees
Labels
Area: App+Library BuildIssues when building Library projects or Application projects.Issues when building Library projects or Application projects.enhancementProposed change to current functionality.Proposed change to current functionality.
Android application type
.NET Android (net7.0-android, net8.0-android, etc.)
Affected platform version
.NET 7,8,9
Description
When you build an Android project, we have logic that "finds" the property
$(RuntimeIdentifier)for the attached device:https://github.com/xamarin/monodroid/blob/867ef5e9ead84e407419e6a1f5d64a3d6583f6d5/tools/msbuild/Xamarin.Android.Common.Debugging.targets#L451-L475
If you have no device attached, it just builds all 4
$(RuntimeIdentifiers).Problem
This can slow down the 1st time experience for MAUI on Android, as there would be no emulators running or Android devices attached. This builds 4 architectures for no reason.
Solution 1
The IDE passes
$(RuntimeIdentifier)to builds. This could be problematic as right now project defaults are:This could have unforseen consequences, in trying to use RID for this. There are many general issues about RIDs in multi-targeted projects:
Solution 2
Invent a new property that would skip the
<GetPrimaryCpu/>task and just set appropriate properties instead.Steps to Reproduce
Did you find any workaround?
No response
Relevant log output
No response