-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Xamarin.Android.Build.Tasks] remove $(AndroidSupportedAbis)
from build.props
#8717
Merged
dellis1972
merged 1 commit into
dotnet:main
from
jonathanpeppers:build.props-AndroidSupportedAbis
Feb 13, 2024
Merged
[Xamarin.Android.Build.Tasks] remove $(AndroidSupportedAbis)
from build.props
#8717
dellis1972
merged 1 commit into
dotnet:main
from
jonathanpeppers:build.props-AndroidSupportedAbis
Feb 13, 2024
Conversation
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
…build.props` Fixes: https://developercommunity.visualstudio.com/t/Visual-Studio-2022-Community-1785-ver/10577484 Related: dotnet#8662 I found the following build performance issue using a .NET Android project template inside VS Windows: 1. Create a new .NET Android project 2. Open some `AndroidResource` `.xml` file in the Android designer 3. *Every* incremental build appears to rebuild everything! `obj\Debug\net8.0-android\build.props` appears to be changing between builds with the change: ```diff --androidsupportedabis=armeabi-v7a;arm64-v8a;x86;x86_64 ++androidsupportedabis=arm64-v8a ``` I narrowed this down to the designer running two targets, `PrepareResources;_GenerateCompileInputs`: https://github.com/xamarin/UITools/blob/7b167eae94ae018ab19344d6bfb45a925415e2a7/src/Xamarin.Designer.Android/Xamarin.AndroidDesigner/MSBuildConstants.cs#L32 In this example: * The designer does *not* mark the build as a "design-time build" with `-p:DesignTimeBuild=true`. This would have used a design-time `build.props`. * The designer does *not* pass in the selected Android device. This code is *ancient*, so I suspect this has just always been an issue? Perhaps, it only occurs in .NET 6+ projects and not Xamarin.Android? Because `$(AndroidSupportedAbis)` is not a "supported" thing in .NET 6+, let's just remove it? Removing `$(AndroidSupportedAbis)` from this file manually does fix the problem for me locally: C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.52\tools\Xamarin.Android.Common.targets There is also a *second* `adb.props` file that triggers a subset of things to rebuild if the selected Android device changes: <WriteLinesToFile File="$(_AdbPropertiesCache)" Lines="AdbTarget=$(AdbTarget);AdbOptions=$(AdbOptions)" Usage of the new property, `$(RuntimeIdentifier)`, also changes `$(IntermediateOutputPath)`, so I feel like we shouldn't need this value in `build.props` in a .NET 6+ world.
dellis1972
approved these changes
Feb 13, 2024
grendello
added a commit
that referenced
this pull request
Feb 13, 2024
* main: [Xamarin.Android.Build.Tasks] remove `$(AndroidSupportedAbis)` from `build.props` (#8717) [Xamarin.Android.Build.Tasks] BannedApiAnalyzers for Resolve() (#8715) Bump to xamarin/Java.Interop/main@dfcbd670 (#8714) [monodroid] C++ tweaks and legacy code cleanup (#8638) Bump to xamarin/xamarin-android-tools/main@a698a33 (#8710) [readme] Add `d17-8` download links. (#8709) Bump external/Java.Interop from `07c7300` to `7f08b77` (#8702) Bump to xamarin/monodroid@848d1277b7 (#8691) [Xamarin.Android.Build.Tasks] `FixAbstractMethodsStep` performance (#8650) Bump to dotnet/installer@fb7b9a4b9e 9.0.100-preview.2.24106.6 (#8700)
grendello
added a commit
that referenced
this pull request
Feb 14, 2024
* main: (116 commits) [tmt] Update to work with current `libxamarin-app.so` (#8694) [Xamarin.Android.Build.Tasks] remove `$(AndroidSupportedAbis)` from `build.props` (#8717) [Xamarin.Android.Build.Tasks] BannedApiAnalyzers for Resolve() (#8715) Bump to xamarin/Java.Interop/main@dfcbd670 (#8714) [monodroid] C++ tweaks and legacy code cleanup (#8638) Bump to xamarin/xamarin-android-tools/main@a698a33 (#8710) [readme] Add `d17-8` download links. (#8709) Bump external/Java.Interop from `07c7300` to `7f08b77` (#8702) Bump to xamarin/monodroid@848d1277b7 (#8691) [Xamarin.Android.Build.Tasks] `FixAbstractMethodsStep` performance (#8650) Bump to dotnet/installer@fb7b9a4b9e 9.0.100-preview.2.24106.6 (#8700) [Mono.Android] Cache `Profiles/api-34.xml` contents (#8679) [monodroid] typemaps may need to load assemblies (#8625) Bump $(AndroidNetPreviousVersion) to 34.0.79 (#8693) Bump to xamarin/java.interop/main@07c73009 (#8681) Bump to dotnet/installer@1c496970b7 9.0.100-preview.2.24078.1 (#8685) [GetAndroidDependencies] Add Jdk dependency info (#8651) [xaprepare] Add support for newer SparkyLinux (#8684) Bump to dotnet/installer@5680e93cb2 9.0.100-preview.2.24073.12 (#8666) $(AndroidPackVersionSuffix)=preview.2; net9 is 34.99.0.preview.2 (#8678) ...
jonathanpeppers
added a commit
that referenced
this pull request
Mar 11, 2024
…build.props` (#8717) Fixes: https://developercommunity.visualstudio.com/t/Visual-Studio-2022-Community-1785-ver/10577484 Related: #8662 I found the following build performance issue using a .NET Android project template inside VS Windows: 1. Create a new .NET Android project 2. Open some `AndroidResource` `.xml` file in the Android designer 3. *Every* incremental build appears to rebuild everything! `obj\Debug\net8.0-android\build.props` appears to be changing between builds with the change: ```diff --androidsupportedabis=armeabi-v7a;arm64-v8a;x86;x86_64 ++androidsupportedabis=arm64-v8a ``` I narrowed this down to the designer running two targets, `PrepareResources;_GenerateCompileInputs`: https://github.com/xamarin/UITools/blob/7b167eae94ae018ab19344d6bfb45a925415e2a7/src/Xamarin.Designer.Android/Xamarin.AndroidDesigner/MSBuildConstants.cs#L32 In this example: * The designer does *not* mark the build as a "design-time build" with `-p:DesignTimeBuild=true`. This would have used a design-time `build.props`. * The designer does *not* pass in the selected Android device. This code is *ancient*, so I suspect this has just always been an issue? Perhaps, it only occurs in .NET 6+ projects and not Xamarin.Android? Because `$(AndroidSupportedAbis)` is not a "supported" thing in .NET 6+, let's just remove it? Removing `$(AndroidSupportedAbis)` from this file manually does fix the problem for me locally: C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.52\tools\Xamarin.Android.Common.targets There is also a *second* `adb.props` file that triggers a subset of things to rebuild if the selected Android device changes: <WriteLinesToFile File="$(_AdbPropertiesCache)" Lines="AdbTarget=$(AdbTarget);AdbOptions=$(AdbOptions)" Usage of the new property, `$(RuntimeIdentifier)`, also changes `$(IntermediateOutputPath)`, so I feel like we shouldn't need this value in `build.props` in a .NET 6+ world.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes: https://developercommunity.visualstudio.com/t/Visual-Studio-2022-Community-1785-ver/10577484
Related: #8662
I found the following build performance issue using a .NET Android project template inside VS Windows:
Create a new .NET Android project
Open some
AndroidResource
.xml
file in the Android designerEvery incremental build appears to rebuild everything!
obj\Debug\net8.0-android\build.props
appears to be changing between builds with the change:I narrowed this down to the designer running two targets,
PrepareResources;_GenerateCompileInputs
:https://github.com/xamarin/UITools/blob/7b167eae94ae018ab19344d6bfb45a925415e2a7/src/Xamarin.Designer.Android/Xamarin.AndroidDesigner/MSBuildConstants.cs#L32
In this example:
The designer does not mark the build as a "design-time build" with
-p:DesignTimeBuild=true
. This would have used a design-timebuild.props
.The designer does not pass in the selected Android device.
This code is ancient, so I suspect this has just always been an issue? Perhaps, it only occurs in .NET 6+ projects and not Xamarin.Android?
Because
$(AndroidSupportedAbis)
is not a "supported" thing in .NET 6+, let's just remove it?Removing
$(AndroidSupportedAbis)
from this file manually does fix the problem for me locally:There is also a second
adb.props
file that triggers a subset of things to rebuild if the selected Android device changes:Usage of the new property,
$(RuntimeIdentifier)
, also changes$(IntermediateOutputPath)
, so I feel like we shouldn't need this value inbuild.props
in a .NET 6+ world.