[Xamarin.Android.Build.Tasks] improve incremental deploy in IDEs #3555
+51
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When doing some testing in the IDE, I noticed something odd for an
incremental deploy:
This target took 2.470s in this case.
This was the Android App template in VS 2019 (not Xamarin.Forms).
I just modified a
.csfile, how didadb.propschange???It turns out during
Build,$(AdbTarget)is blank and duringInstallit is properly set. That means that
Installis currently alwaysrunning
_BuildApkFastDevon incremental deployments.I let the IDE team know, so they can see about sending
$(AdbTarget)during
Build. However, they can't do this in every case, due to theway the UI is setup. Depending on the user's selection, current
document, focus, etc. the play button in VS may not be enabled or even
know the current attached device.
This leads me to think we should really change something in our
MSBuild targets, which currently does:
If we didn't write this file when
$(AdbTarget)is blank, the problemwould be avoided. However, we also should write the file if it does
not exist. If an
Inputto a target doesn't exist, it will run everytime.
adb.propsis used asInputsfor some targets.I added a test for this scenario in the
MSBuildDeviceIntegrationtests.