[One .NET] no longer produce .apk for IDE builds #5570
Merged
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.
Related: #5436
In "legacy" Xamarin.Android, we have the following behavior:
Build
target does not produce an.apk
or sign it.SignAndroidPackage
(orInstall
) would do this.So if you hit F6, Ctrl+B, Command+B, etc. in Visual Studio, you don't
have to wait on a valid
.apk
file to be produced to get buildresults. This is useful for incremental build performance -- and
developers' habit of hitting build all the time.
dotnet build
has different behavior, because it should inherentlyproduce something that is runnable.
dotnet build
currently producesan
.apk
file and signs it.To match "legacy" Xamarin.Android's behavior in IDEs we could do
something different while in Visual Studio when
$(BuildingInsideVisualStudio)
is set. This way we get the desiredbehavior:
dotnet build
at the command-line produces a signed.apk
file..apk
onBuild
. However, when "deploy"occurs, the
Install
target will handle producing an.apk
file asneeded.
This allowed me to update the
PerformanceTest
that was addingadditional time under .NET 6 for producing
.apk
files. Our MSBuildtests always set
$(BuildingInsideVisualStudio)
for testing.I also updated the
[Retry]
attributes so the value was in one place.