forked from dotnet/android
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[One .NET] no longer produce .apk for IDE builds
Related: dotnet#5436 In "legacy" Xamarin.Android, we have the following behavior: 1. The `Build` target does not produce an `.apk` or sign it. 2. Only `SignAndroidPackage` (or `Install`) 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 build results. This is useful for incremental build performance -- and developers' habit of hitting build all the time. `dotnet build` has different behavior, because it should inherently produce something that is runnable. `dotnet build` currently produces an `.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 desired behavior: * `dotnet build` at the command-line produces a signed `.apk` file. * IDEs will not produce an `.apk` on `Build`. However, when "deploy" occurs, the `Install` target will handle producing an `.apk` file as needed. This allowed me to update the `PerformanceTest` that was adding additional time under .NET 6 for producing `.apk` files. Our MSBuild tests always set `$(BuildingInsideVisualStudio)` for testing. I also updated the `[Retry]` attributes so the value was in one place.
- Loading branch information
1 parent
c33f557
commit b91d719
Showing
3 changed files
with
38 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters