[Xamarin.Android.Build.Tasks] cache aapt2 version in AppDomain #2975
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.
If you have
$(AndroidUseAapt2)set toTrue(which is also thedefault on master), the
<ResolveAndroidTooling/>tooling task seemsto take longer:
I figured out this was due to how we shell out to
aapt2 versiontocheck the version of
aapt2.We should use
RegisterTaskObjectand cache the result of this call!aapt2, so if someone changes theaapt2used, it should callaapt2 versionagain.anything else because we are shipping
aapt2now.But what if there is a Xamarin.Android update?
If you install a new VSIX, VS on Windows makes you restart the IDE. If
you install a PKG on Mac, you need to restart the IDE anyway,
because it keeps all system MSBuild
.targetsfiles in memory...Weird things will happen if you install a Xamarin.Android PKG on Mac
and don't restart VS for Mac.
After this change, when the
aapt2 versioncall is cached:This was the "Hello World" sample project in this repo.