Repository navigation
[Xamarin.Android.Build.Tasks] Replace GetAppSettingsDirectory - #13383
Merged
jonathanpeppers merged 2 commits intoNov 4, 2026
Merged
Conversation
Resolve the existing LocalApplicationData/Xamarin/Mono for Android path during _ResolveMonoAndroidSdks with property functions, retaining settings and keystore overrides. Remove the obsolete task and its diagnostic-prefix documentation, and cover target-time defaults and overrides with standalone MSBuild tests. Co-authored-by: Copilot App <[email protected]>
Keep the existing test suite unchanged as requested. There were no pre-existing GetAppSettingsDirectory tests to migrate. Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the refactor that moves settings-path resolution into the existing SDK setup flow.
No open issues 🎉
What changed in this PR
Replaces the single-purpose GetAppSettingsDirectory task with an MSBuild property calculation in _ResolveMonoAndroidSdks, keeping settings-path resolution within the existing SDK setup flow.
Changes:
- Computes
AppSettingsDirectoryusing the same special folder and directory suffix, preserving execution timing and existing overrides. - Removes the obsolete task implementation and registration.
- Removes the task’s
GASdiagnostic-prefix documentation entry.
| File | Description |
|---|---|
| src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets | Replaces the task invocation with a conditional property calculation and removes registration. |
| src/Xamarin.Android.Build.Tasks/Tasks/GetAppSettingsDirectory.cs | Deletes the obsolete managed task. |
| Documentation/docs-mobile/messages/index.md | Removes the retired task’s diagnostic-prefix entry. |
Review effort: Balanced
jonathanpeppers
approved these changes
Nov 4, 2026
jonathanpeppers
deleted the
simonrozsival-replace-settings-directory-task
branch
November 4, 2026 07:41
Member
|
/backport to release/11.0.1xx |
Contributor
|
Started backporting to |
jonathanpeppers
pushed a commit
that referenced
this pull request
Nov 20, 2026
…3686) `<GetAppSettingsDirectory/>` exists only to combine `Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)` with `Xamarin/Mono for Android`. Keeping a managed task for this calculation is unnecessary when MSBuild property functions can express the same operation. Compute `$(AppSettingsDirectory)` inside the existing `_ResolveMonoAndroidSdks` target, preserving execution timing, special-folder resolution, the directory suffix, and existing settings/keystore overrides. Remove the obsolete task implementation, registration, and `GAS` diagnostic-prefix entry. The existing property contracts remain unchanged. Direct external invocations of the removed `Xamarin.Android.Tasks.GetAppSettingsDirectory` type are no longer supported; no additional in-tree callers or task API baseline were found. No new tests are included, as requested; there were no existing task tests to migrate. Co-authored-by: Šimon Rozsíval <[email protected]> Co-authored-by: Copilot App <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
<GetAppSettingsDirectory/>exists only to combineEnvironment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)withXamarin/Mono for Android. Keeping a managed task for this calculation is unnecessary when MSBuild property functions can express the same operation.Compute
$(AppSettingsDirectory)inside the existing_ResolveMonoAndroidSdkstarget, preserving execution timing, special-folder resolution, the directory suffix, and existing settings/keystore overrides. Remove the obsolete task implementation, registration, andGASdiagnostic-prefix entry.The existing property contracts remain unchanged. Direct external invocations of the removed
Xamarin.Android.Tasks.GetAppSettingsDirectorytype are no longer supported; no additional in-tree callers or task API baseline were found. No new tests are included, as requested; there were no existing task tests to migrate.Validation:
make prepare && make all: preparation and solution compilation passed; workload configuration failed becausemake alldoes not build the additional API 37.1 reference assembly.make leeroy: passed, including extra API levels and local workload configuration.net11.0-androidproject:./dotnet-local.sh msbuild "$SMOKE_PROJECT" -t:_ResolveMonoAndroidSdks -getProperty:AppSettingsDirectory,_AppSettingsDirectory,_ApkDebugKeyStore -nr:false -v:quiet. The default resolved to the existing LocalApplicationData directory and debug keystore.'-p:AppSettingsDirectory=custom settings' '-p:_ApkDebugKeyStore=custom keys/debug.keystore' -m -mt -warnaserror:MSB4286,MSB4287,MSB4288passed and preserved both overrides.$SMOKE_PROJECTwas/Users/simon/.copilot/session-state/2b0cfa59-0133-47b7-b71e-c0b80d306571/files/settings-smoke.csproj;./dotnet-local.sh restore "$SMOKE_PROJECT" --configfile NuGet.config -v minimalpassed before the smoke checks.git diff --check: passed.No existing automated test suite was run; validation used the full local SDK build and direct target execution. The temporary 24-case target fixture passed under both system and local SDKs before being removed to honor the request not to add tests.