Repository navigation
[build] Use dotnetup and standard solution build entrypoints - #13430
simonrozsival wants to merge 13 commits into
Conversation
90b278f to
31a6eba
Compare
Context: #13430 A source build with NUGET_PACKAGES pointing at a private cache reached workload installation, then failed with MSB3932 because the generated path joined the cache directory and package ID without a separator. NuGetPackageRoot can retain the environment-provided directory without a trailing slash. Use MSBuild EnsureTrailingSlash when generating dependency archive paths. Item evaluation with and without a trailing separator now produces identical paths, including the physically present archive from the failed build. Co-authored-by: Copilot App <[email protected]>
Context: #13430 Linux template tests in Azure build 1672175 fail with "No templates or subcommands found matching: android". The local workload installer preserves the uppercase Microsoft.Android.Templates archive filename when copying it into template-packs, but the SDK workload resolver requires a lowercase package ID and version. Case-insensitive hosts conceal the mismatch. Copy template and library archives to the existing canonical PackageFileName instead of preserving the source basename. A generated two-pack Install fixture verifies the exact directory entries and copied bytes for mixed-case package IDs and prerelease versions; both unchanged Install batches skip without copying again. Co-authored-by: Copilot App <[email protected]>
Context: #13430 A source build with NUGET_PACKAGES pointing at a private cache reached workload installation, then failed with MSB3932 because the generated path joined the cache directory and package ID without a separator. NuGetPackageRoot can retain the environment-provided directory without a trailing slash. Use MSBuild EnsureTrailingSlash when generating dependency archive paths. Item evaluation with and without a trailing separator now produces identical paths, including the physically present archive from the failed build. Co-authored-by: Copilot App <[email protected]>
410cf2a to
274adf6
Compare
Context: #13430 Linux template tests in Azure build 1672175 fail with "No templates or subcommands found matching: android". The local workload installer preserves the uppercase Microsoft.Android.Templates archive filename when copying it into template-packs, but the SDK workload resolver requires a lowercase package ID and version. Case-insensitive hosts conceal the mismatch. Copy template and library archives to the existing canonical PackageFileName instead of preserving the source basename. A generated two-pack Install fixture verifies the exact directory entries and copied bytes for mixed-case package IDs and prerelease versions; both unchanged Install batches skip without copying again. Co-authored-by: Copilot App <[email protected]>
Replace Make and private SDK installers with an SDK pinned in global.json and selected by dotnetup. Run preparation and local workload configuration from solution build hooks, and expose product packaging through the standard solution Pack target. Keep SDK binaries shared while isolating Android and MAUI workloads inside each worktree. Reduce dotnet-local to workload selection and argument forwarding, and use it in CI only where local workloads are required. Update build and test documentation to match. Use the checked-out branch when GitBranch runs in a worktree so packages and workload manifests receive consistent versions. Co-authored-by: Copilot App <[email protected]>
Preserve the SDK argument separator through dotnetup so NUnit run settings and tool arguments reach their intended parsers. Avoid quoting trailing Windows directory separators in workload dependency resolution. Configure source workloads for solution builds on CI as well as local builds. Disable the CLI MSBuild server in the minimal local-workload wrappers so a previously cached resolver cannot select manifests from another workload root. Co-authored-by: Copilot App <[email protected]>
CI SDKs can already contain every workload dependency. The generated plan then has no _WorkloadPack items, but its Install target still invokes Unzip with an empty DestinationFolder and fails with MSB4044. Skip the target when the plan has no packs, preserving installation for nonempty plans. Reproduced the empty-plan failure locally before the fix, verified the guarded plan succeeds without Unzip execution, and verified a four-pack source dependency installation still runs successfully. Co-authored-by: Copilot App <[email protected]>
CI installed the SDK pinned by global.json, but workload resolution used the dependency package version from the merged main branch. That SDK directory did not exist, so the resolver silently omitted host-specific Android and MonoTargets packs. Extraction appeared successful, then app and test builds failed with NETSDK1147 or missing SDK directories. Use NETCoreSdkVersion, as the workload feature-band calculation already does, and reject nonexistent SDK directories before resolving packs. A local mismatched-version reproduction confirmed the missing host packs; the corrected MSBuild target produced the complete plan, and a legitimate empty-plan Install still succeeds. Co-authored-by: Copilot App <[email protected]>
Context: #13430 A source build with NUGET_PACKAGES pointing at a private cache reached workload installation, then failed with MSB3932 because the generated path joined the cache directory and package ID without a separator. NuGetPackageRoot can retain the environment-provided directory without a trailing slash. Use MSBuild EnsureTrailingSlash when generating dependency archive paths. Item evaluation with and without a trailing separator now produces identical paths, including the physically present archive from the failed build. Co-authored-by: Copilot App <[email protected]>
Context: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1672175 The worktree-local installer uses MSBuild Unzip instead of the SDK workload installer. Unzip preserves zone-less ZIP entry timestamps, so files packed on another agent can be extracted into the future. CI consequently rebuilt unchanged SDK and reference inputs on every invocation: AutoImport.props invalidated Android targets, and Java.Interop.dll forced CoreCompile to run again. Finalize each unpacked workload pack by clamping only future file timestamps to the current UTC time before applying Unix permissions. Existing older timestamps, file contents and modes remain unchanged; packed template and library archives are unaffected. The generated-install fixture reproduces future inputs with the old tool, verifies the timestamp correction and permission preservation, and skips an unchanged installation. After real extraction under America/Los_Angeles, retained ordinary and unchanged CoreCLR app build logs show CoreCompile, Java stubs, Java compilation and Dalvik compilation correctly skipped on the second build. Co-authored-by: Copilot App <[email protected]>
Context: #13430 Linux template tests in Azure build 1672175 fail with "No templates or subcommands found matching: android". The local workload installer preserves the uppercase Microsoft.Android.Templates archive filename when copying it into template-packs, but the SDK workload resolver requires a lowercase package ID and version. Case-insensitive hosts conceal the mismatch. Copy template and library archives to the existing canonical PackageFileName instead of preserving the source basename. A generated two-pack Install fixture verifies the exact directory entries and copied bytes for mixed-case package IDs and prerelease versions; both unchanged Install batches skip without copying again. Co-authored-by: Copilot App <[email protected]>
Update the newly added local-build skill for the shared SDK and standard solution build entrypoints. Co-authored-by: Copilot App <[email protected]>
274adf6 to
445169e
Compare
Host-side tools targeting earlier frameworks need their runtimes, not separate SDK installations. Keep the repository-pinned SDK as the single build SDK and install the .NET 11 runtime independently of the stable tooling target framework. Use the same SDK for the isolated Arcade signing adapter, preserve its global.json pin, and publish the resolved shared dotnet root to Arcade. Install the .NET 8 runtime for SwixBuild. Make the manifest project SDK-free and remove its obsolete SDK 8 pin and redundant restore, so desktop MSBuild does not need to import the newer SDK. Validation: git diff --check passed. Parsed 48 pipeline YAML files and both signing XML projects; checked 29 affected template calls, runtime pins, signing working directories and obsolete-variable removal. Compared all six PowerShell scripts and the property-query project with the previously accepted V5 inputs; they remain unchanged apart from checkout line endings. The earlier V5 check parsed representative parameter-rendered scripts and evaluated MSBuildToolsPath successfully. Actual provisioning and Windows Swix/signing were not run; no new managed validation phase was executed. Co-authored-by: Copilot App <[email protected]>
Keep SDKs, runtimes, and dotnetup metadata shared across worktrees while making CI installation explicitly noninteractive. Log the selected tool's path and version so differences between cached agent tools are visible. Resolve the first application match once and invoke that executable for the entire setup step; Get-Command can otherwise return multiple paths. Apply the same noninteractive option to signing's .NET 8 runtime install. Validation: the installed dotnetup accepts all three install argument sets with --help. An extracted PowerShell step harness passed seven stubbed success/failure cases, including paths with spaces, multiple application matches, command order, and native exit propagation. All 48 pipeline YAML documents parse, and git diff --check passed. No SDK/runtime installation or Windows signing execution was performed. Co-authored-by: Copilot App <[email protected]>
Darc already updates tools.dotnet and an existing sdk.version together when Arcade brings a newer bootstrap SDK. Setting tools.pinned disables both updates and leaves the shared SDK selection stuck. Remove that opt-out without changing the currently selected SDK. Document that automatic updates follow Arcade's bootstrap SDK, not the produced Microsoft.NET.Sdk dependency, and never downgrade to an older version. Validation: JSON parsing and a semantic comparison against the parent passed: tools.pinned is the only removed setting, both SDK version fields remain equal, and the resolver policy is unchanged. git diff --check passed. No SDK installation or build was needed because the selected SDK and build inputs are unchanged. Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The skill-runner workflow still invokes the deleted eng/install-dotnet.sh, causing its prerequisite step to fail before the agent starts.
2 open issues
What changed in this PR
This PR moves .NET for Android development to a shared, pinned SDK managed by dotnetup, with solution-level build and packaging entrypoints. Android and MAUI workload files remain isolated within each worktree.
Changes:
- Moves preparation, additional API-level builds, workload setup, and packaging into solution targets; removes Make and legacy build/install scripts.
- Adds local workload dependency resolution and updates wrappers to select source or extracted packs, including the previous Android SDK needed for compatibility tests.
- Migrates CI, signing, automation, and contributor documentation to the new commands and SDK layout.
| File | Description |
|---|---|
src/Xamarin.Installer.Build.Tasks/README.md |
Updates installer testing commands and workload paths. |
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/TestEnvironment.cs |
Resolves shared runtime and worktree-local pack locations. |
Makefile |
Removes Make entrypoints. |
global.json |
Pins the shared SDK and Arcade tool selection. |
eng/README.md |
Documents SDK selection, CI, and signing setup. |
eng/install-dotnet.sh |
Removes the per-worktree Unix SDK installer. |
eng/install-dotnet.ps1 |
Removes the per-worktree Windows SDK installer. |
dotnet-local.sh |
Selects local workload roots and forwards through dotnetup. |
dotnet-local.cmd |
Adds equivalent Windows workload selection and forwarding. |
Documentation/workflow/UnitTests.md |
Updates test commands and configuration guidance. |
Documentation/workflow/DevelopmentTips.md |
Updates local feeds and MAUI installation guidance. |
Documentation/project-docs/ExploringSources.md |
Updates build configuration and dependency-cache descriptions. |
Documentation/Java.Interop/BuildConfiguration.md |
Updates preparation and standalone testing commands. |
Documentation/building/windows/instructions.md |
Documents standard Windows build, pack, and test entrypoints. |
Documentation/building/unix/instructions.md |
Replaces Make instructions with solution-based commands. |
Documentation/building/unix/dependencies.md |
Updates SDK installation and prerequisite guidance. |
Documentation/building/configuration.md |
Updates the prerequisite command for integration tests. |
Directory.Build.props |
Derives dotnet paths from the running SDK. |
build.sh |
Removes the Unix build dispatcher. |
build.cmd |
Removes the Windows build dispatcher. |
build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/GitBranch.cs |
Uses current-branch detection with detached-HEAD fallback. |
build-tools/workload-tools/workload-tools.csproj |
Adds an SDK-resolver-backed workload utility. |
build-tools/workload-tools/Program.cs |
Generates pack installation plans and finalizes extracted files. |
build-tools/scripts/runtime-helpers.mk |
Removes obsolete runtime rebuild shortcuts. |
build-tools/scripts/Prepare.proj |
Removes private SDK installation from preparation. |
build-tools/scripts/Packaging.mk |
Removes Make packaging shortcuts. |
build-tools/scripts/msbuild.mk |
Removes Make’s MSBuild abstraction. |
build-tools/scripts/DotNet.targets |
Removes legacy orchestration and localizes MAUI installation. |
build-tools/scripts/BuildEverything.mk |
Removes Make’s full-build orchestration. |
build-tools/create-packs/Microsoft.Android.Ref.proj |
Includes binding XML documentation only when present. |
build-tools/create-packs/Directory.Build.targets |
Updates packaging flags, extraction paths, and cleanup. |
build-tools/create-packs/ConfigureLocalWorkload.targets |
Restores and installs dependencies into local workload roots. |
build-tools/automation/yaml-templates/variables.yaml |
Separates tooling runtime and target-framework versions. |
build-tools/automation/yaml-templates/use-dot-net.yaml |
Removes the previous SDK provisioning template. |
build-tools/automation/yaml-templates/stage-xamarin-android-tools-tests.yaml |
Migrates host-tool builds, tests, and result publication. |
build-tools/automation/yaml-templates/stage-package-tests.yaml |
Updates bootstrap commands and wrapper configuration. |
build-tools/automation/yaml-templates/stage-linux-tests.yaml |
Passes workload configuration to wrapper tests. |
build-tools/automation/yaml-templates/setup-test-environment.yaml |
Forwards the tooling runtime version. |
build-tools/automation/yaml-templates/setup-test-environment-steps.yaml |
Uses shared SDK setup and dotnetup prerequisite builds. |
build-tools/automation/yaml-templates/setup-test-environment-public.yaml |
Updates public test setup parameters. |
build-tools/automation/yaml-templates/run-sliced-nunit-tests.yaml |
Launches the test slicer through dotnetup. |
build-tools/automation/yaml-templates/run-nunit-tests.yaml |
Preserves NUnit arguments and explicitly publishes results. |
build-tools/automation/yaml-templates/run-maui-r2r-helix-matrix.yaml |
Updates workload selection and Helix submission commands. |
build-tools/automation/yaml-templates/run-dotnet-preview.yaml |
Supports shared SDK or local-workload execution. |
build-tools/automation/yaml-templates/install-repository-sdk.yaml |
Adds shared SDK and tooling runtime provisioning. |
build-tools/automation/yaml-templates/install-dotnet-tool.yaml |
Installs tools through dotnetup from the checkout. |
build-tools/automation/yaml-templates/commercial-build.yaml |
Uses solution build and pack commands. |
build-tools/automation/yaml-templates/build-windows-steps.yaml |
Migrates Windows preparation, builds, and packaging. |
build-tools/automation/yaml-templates/build-macos.yaml |
Updates the signing command to use dotnetup. |
build-tools/automation/yaml-templates/build-macos-steps.yaml |
Migrates macOS SDK setup, builds, and packaging. |
build-tools/automation/yaml-templates/build-linux-steps.yaml |
Migrates Linux SDK setup, builds, and packaging. |
build-tools/automation/yaml-templates/apk-instrumentation.yaml |
Selects the pinned SDK CLI and local workloads for device tests. |
build-tools/automation/dnceng/arcade/Workloads.proj |
Removes the separate Swix project restore. |
build-tools/automation/dnceng/arcade/vsman/Workload.vsmanproj |
Makes the manifest project SDK-free. |
build-tools/automation/dnceng/arcade/vsman/global.json |
Removes the obsolete SDK 8 pin. |
build-tools/automation/azure-pipelines.yaml |
Migrates MAUI validation and publishing commands. |
build-tools/automation/azure-pipelines-public.yaml |
Updates public pipeline SDK and workload usage. |
build-tools/automation/azure-pipelines-nightly.yaml |
Collects API-scan inputs from extracted workload packs. |
build-tools/automation/azure-pipelines-internal.yaml |
Updates signing runtimes, Arcade setup, and MAUI validation. |
build-tools/automation/azure-pipelines-apidocs.yaml |
Migrates documentation tooling and generation commands. |
before.Microsoft.Android.sln.targets |
Adds automatic preparation before solution builds. |
after.Microsoft.Android.sln.targets |
Adds solution Pack and post-build workload setup. |
.github/workflows/nightly-fix-finder.md |
Updates automated-fix validation instructions. |
.github/workflows/nightly-fix-finder.lock.yml |
Updates generated workflow body-hash metadata. |
.github/workflows/copilot-setup-steps.yml |
Bootstraps dotnetup and builds the solution. |
.github/skills/update-androidsdk-packages/SKILL.md |
Updates SDK-package validation commands. |
.github/skills/tests/SKILL.md |
Updates test entrypoints and workload prerequisites. |
.github/skills/tests/references/test-catalog.md |
Updates test commands and configuration examples. |
.github/skills/local-build/SKILL.md |
Replaces Make-based build and troubleshooting guidance. |
.github/copilot-instructions.md |
Aligns contributor guidance with the new build workflow. |
Review effort: Balanced
Normal solution Pack also builds, so mark its Build dependency before local workload configuration and preserve extracted workloads in that context. Keep ordinary Build/Rebuild cleanup unchanged. Condition preparation and finalization on build-enabled Mono.Android solution references so host-only filters skip both hooks and their dependencies. Replace the deleted skill-runner installer invocation with dotnetup and regenerate its workflow lock using the existing compiler. Validated the generator solution filter and BootstrapTasks builds, nine focused MSBuild regression cases, and six isolated bootstrap success/failure cases. Normal workflow compilation passed; diagnostic dry-run failed on existing token-pool shellcheck findings. Co-authored-by: Copilot App <[email protected]>
Solution Clean deleted shared Android SDK/NDK and JDK installations and cached downloads. Native cleanup also invoked Ninja in potentially missing CMake directories, while Java utility cleanup required Gradle. Preserve shared toolchains and cached archives. Initialize native flavor paths before removing generated intermediates and per-RID outputs, without deleting a custom output root. Remove local Java build directories directly and correct aapt2 cleanup to delete executables rather than directories. Document the selected-configuration Clean entrypoint. Validation on macOS: both commands passed, including repeated Debug cleanup and cleanup after the generator build: * dotnetup dotnet clean Microsoft.Android.slnx -c Debug -m:2 -nr:false -v:minimal * dotnetup dotnet clean Microsoft.Android.slnx -c Release -m:2 -nr:false -v:minimal DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1 dotnetup dotnet build src/generator/generator.slnf -c Debug -m:2 -nr:false -v:minimal passed with 38 existing SourceLink/repository-information warnings and no errors. A temporary regression harness passed all 17 actual-project MSBuild invocations, including missing native/Java tools, repeated cleanup, flavor/configuration/output-root isolation, and preservation of 21 owned shared-tool sentinels. An additional aapt2 custom-output-path probe passed. XML parsing and git diff --check passed. Windows, full SDK rebuild, product packaging, and device tests were not run for this Clean-only correction. Co-authored-by: Copilot App <[email protected]>
|
/review |
|
✅ Android PR Reviewer completed successfully!
|
There was a problem hiding this comment.
⚠️ Needs Changes
Findings: 1 ❌ error · 0
Reviewed d0aa1bfd5acddd0a12ce10ae6675c1bf752d8b6c against the PR base, including full-file context and the documentation/workflow updates. The shared-SDK/worktree-local-workload separation is well structured, reuses the SDK workload resolver, preserves the previous Android SDK dependency, and makes native/Java cleanup independent of installed build tools. One workflow regression remains: the SDK-package update skill still invokes required helpers through bare dotnet after bootstrap stopped exposing the pinned SDK on PATH. The inline comment identifies all affected invocations and the correction.
CI: Azure build 1698831 was still running when checked. The macOS build, both Android Tools test jobs, and CLA had passed; Windows/Linux builds and the remaining test matrix were not complete. No failing GitHub check was returned at that point, but this is not a green-CI verdict. Detailed Azure build/timeline retrieval was unavailable because the Azure CLI failed and required authentication.
Validation limits: Source/configuration review only; no local build or test result is claimed. The repository-pinned SDK and dotnetup were unavailable in this environment, and the attempted wrapper syntax check was denied.
Generated by Android PR Reviewer for #13430 · copilot · gpt61 · 152.3 AIC · ⌖ 7.97 AIC · ⊞ 20.3K
Comment /review to run again
| dotnet build build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj -v:minimal | ||
| curl -fsSL https://aka.ms/dotnetup/get-dotnetup.sh -o "$RUNNER_TEMP/get-dotnetup.sh" | ||
| bash "$RUNNER_TEMP/get-dotnetup.sh" | ||
| export PATH="$HOME/.dotnetup:$PATH" |
There was a problem hiding this comment.
🤖 ❌ Patterns — Please migrate the selected skill's file-based helper commands to dotnetup dotnet run as part of removing the SDK PATH override. This bootstrap now adds only dotnetup to PATH, but .github/skills/update-androidsdk-packages/SKILL.md still instructs the runner to execute bare dotnet run for all six manifest queries (lines 111–116), archive hashing (line 153), and the platform API diff (lines 188–189). The generated workflow installs system .NET 8, while the repository's global.json requires exactly 12.0.100-alpha.1.26551.101 with roll-forward disabled. Installing that SDK through dotnetup does not make bare dotnet select its shared installation, so these required helpers fail SDK resolution on a clean runner. Update all eight helper invocations and the workflow's helper guidance to use dotnetup dotnet run; retain the shared-installation design rather than restoring a global SDK-path override.
{Rule: Wire every consumer when changing SDK selection; documentation must match execution.}

Building
Microsoft.Android.slnxalone previously omitted preparation, additional API levels, and development-workload configuration supplied by Make. Packaging had another custom entrypoint, and each worktree installed a private .NET SDK.Move this orchestration into the solution so the developer entrypoints become:
Remove Make, its helper files, the root build scripts, and
eng/install-dotnet.{sh,ps1}rather than retaining forwarding layers.Share the SDK, not the development workload
Pin SDK selection in
global.jsonand use dotnetup's shared installation. Keep dotnetup metadata and SDK/runtime files shared across worktrees; do not introduce a checkout-specific installation or metadata directory. Prepare before solution Build/Rebuild, then build additional API levels and configure the local workload afterward. Gate both entire hooks, including their dependencies, on build-enabledMono.Androidproject references so host-only solution filters and configurations that disable Android skip those phases.Android and MAUI manifests and packs remain worktree-local: resolve dependencies through the SDK workload resolver and restore/extract them into the worktree, not the shared SDK. Preserve the previous Android SDK installation required by #13406.
Keep
dotnet-local.shand.cmdonly for selecting local manifests/packs and forwarding to dotnetup. Prefer extracted distribution workloads when present, otherwise source output.CONFIGURATIONselects the workload configuration, defaulting to Debug; the application's-cremains independent. Disable MSBuild-server reuse in the wrappers to avoid reusing a workload resolver initialized against another manifest root.Let Maestro update the SDK selection
Leave
tools.pinnedunset. During Arcade dependency updates, darc/Maestro already advances bothtools.dotnetand an existingsdk.versiontogether when the incoming bootstrap SDK is newer. Settingtools.pinned: truewould disable both updates. Keep the two current version fields equal without changing the selected SDK in this correction.This policy follows Arcade's bootstrap SDK, not the produced
Microsoft.NET.Sdkdependency ineng/Version.Details.xml. Those versions may differ, and an older or equal incoming bootstrap SDK does not change the selection. In particular, removingtools.pinneddoes not immediately bump the current SDK. No custom synchronization script or workflow is introduced. See the darc updater implementation and the review discussion.tools.pinnedis a darc SDK-selection control; no dedicated prose documentation was found, so the implementation linked above is the authoritative reference for its behavior. It is separate from the per-dependencyPinned="true"attribute ineng/Version.Details.xml, documented in Darc: "Pinning" dependencies so they do not update. The former freezes automatic SDK-selection updates; the latter excludes an individual dependency from automatic darc/Maestro updates and defaults to false when omitted. Removingtools.pinneddoes not unpin any XML dependency.Use one SDK and install older runtimes separately
CI installs the repository SDK from
global.jsonand the older .NET 11 runtime needed by host-side tests/tools, rather than installing another SDK. Keep runtime versions distinct from the stable tooling target-framework version.Internal signing uses the same installer plus a .NET 8 runtime for SwixBuild. Preserve the Arcade adapter's copied
global.json, derive the actual shared SDK root for Arcade, and set its working directories explicitly. Make the Swix manifest project SDK-free and remove its obsolete SDK 8 pin and redundant restore; it produces a setup manifest without compiling managed code.Log the selected dotnetup executable path and version, choose the first application match when several installations are on
PATH, and invoke that same executable throughout setup. Pass--interactive falseexplicitly to SDK/runtime installation, including signing's additional runtime. Preserve shared installation selection and explicit native exit-code propagation.Make Pack a solution entrypoint
Route solution Pack to the existing packaging projects, which still define product contents. Build first unless
--no-buildis supplied, propagate that option to child packaging commands, and preserve extracted workloads while packing. Set a private packing-context flag before the Build dependency runs and forward it to local-workload configuration, so normal Pack does not delete the extracted Android/MAUI installation. Ordinary Build/Rebuild and explicit workload extraction retain their cleanup behavior.Use
git rev-parse --abbrev-ref HEADfor worktree branch detection, retaining detached-HEAD fallback and CI override. The oldname-revfallback could select another branch sharing the commit and produce inconsistent package/manifest versions.Clean outputs without deleting shared tooling
dotnetup dotnet clean Microsoft.Android.slnx -c Debugpreviously removed shared Android SDK/NDK components, license state, the JDK, and cached downloads. Native Clean also invoked Ninja in potentially missing CMake directories, and Java utility cleanup required Gradle. These behaviors made ordinary solution Clean unsafe for shared tooling and unreliable on unbuilt or partially built trees.Preserve shared toolchain installations and download caches, including the cached bundletool JAR. Initialize native flavor paths before removing generated intermediates and per-RID outputs; preserve unrelated files in a custom
$(OutputPath)and isolate other flavors/configurations. Remove local Java build directories directly instead of invoking Gradle, and correct aapt2 cleanup to delete its executables rather than directories. Native cleanup no longer requires Ninja or a configured CMake tree.Document Clean on Unix and Windows.
-c Releaseselects Release outputs; Clean is not a full checkout reset.CI and workload compatibility
Preserve NUnit's inner separator through dotnetup with an explicit outer separator, terminate quoted Windows directories with
., and retain CI source-workload prerequisites. Adapt upstream'sRunSlicedTests.csinvocation without restoring the removed slicer installation.Update the existing skill-runner bootstrap to acquire dotnetup, install the repository-pinned SDK noninteractively, and forward its BootstrapTasks build through dotnetup instead of calling the deleted installer or setting a private
DOTNET_ROOT. Regenerate its existing lock using the same gh-aw v0.92.0 compiler; keep its permissions, guards, credentials, and network configuration unchanged.Guard genuinely empty dependency installation plans while preserving nonempty installation. Use actual
NETCoreSdkVersionrather than the dependency SDK package version, reject nonexistent SDK directories, and normalizeNuGetPackageRootwithEnsureTrailingSlashfor generated archive paths.Clamp only future extracted-file timestamps before restoring Unix permissions; ZIP timezone differences otherwise invalidate incremental builds. Preserve older timestamps, bytes, and modes. Use canonical lowercase packed template/library archive filenames so installation also works on case-sensitive hosts.
Validation
Clean correction (
d0aa1bfd5a, macOS):dotnetup dotnet clean Microsoft.Android.slnx -c Debug -m:2 -nr:false -v:minimal— passed, including repeated cleanup and cleanup after the generator build.dotnetup dotnet clean Microsoft.Android.slnx -c Release -m:2 -nr:false -v:minimal— passed.DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1 dotnetup dotnet build src/generator/generator.slnf -c Debug -m:2 -nr:false -v:minimal— passed with 38 existing SourceLink/repository-information warnings and no errors.git diff --check— passed. No Windows execution, full SDK rebuild, product packaging, device tests, or post-fix CI result is claimed for this Clean-only correction.Review corrections (
4b1ef03456):DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1 dotnetup dotnet build src/generator/generator.slnf -c Debug -m:2 -nr:false— passed after restoring initially missing assets; 38 SourceLink/repository-information warnings, no errors. The initial--no-restoreattempt failed with NETSDK1004 because this checkout had no assets files.DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1 dotnetup dotnet build build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj -v:minimal -m:2 -nr:false— passed; six SourceLink/repository-information warnings, no errors.NoBuild=truepreservation. The isolated packaging fixture used unchanged production orchestration and the actual deletion target with stubbed child work; this is not full product packaging validation.bash -nandshellcheck --shell=bashpassed for that block. Six isolated command-stub cases passed: success, download/installer/SDK/build failures, and another skill. Paths containing spaces were covered. No live SDK installation was performed.compile skill-runner --no-check-update— passed with the existing missingconcurrency.job-discriminatorwarning.compile skill-runner --dry-run --no-check-updateemitted a diagnostic lock but its gate failed on existing token-pool shellcheck SC2206/SC2004 findings. No workflow was dispatched; Docker-based scanners were not run. The normal regenerated lock is committed, not the diagnostic lock.git diff --checkpassed. No full SDK rebuild, product packaging, device tests, or post-fix CI result is claimed for this correction.Maestro SDK selection (
a8795b398b): JSON parsing and semantic comparison with the parent passed:tools.pinnedis the only removed setting,sdk.versionandtools.dotnetremain equal and unchanged, and the resolver policy is unchanged.git diff --checkpassed. The native updater's pinned/unpinned and newer-only branches were inspected alongside its regression tests. No SDK installation or build was run for this metadata/documentation correction because the selected SDK and build inputs are unchanged; no live Maestro update was executed.CI hardening (
14c293180e):dotnetup sdk install --no-progress --interactive false --help— passed.dotnetup runtime install 11.0.0-rc.3.26522.148 --no-progress --interactive false --help— passed.dotnetup runtime install 8.0 --no-progress --interactive false --help— passed. These checks used dotnetup0.3.0-preview.1.26511.1; they did not install anything.git diff --check— passed.Runtime/signing follow-up (
50bb21fb20): static YAML/template-contract, XML, pin/reference, and adapter-working-directory checks passed. Earlier separately accepted bounded validation covered representative parameter-rendered PowerShell syntax for six selected blocks and actualWorkloads.projSDK-root evaluation/path checks. That was not Azure template expansion, installer execution, Windows Swix, or shared-SDK immutability validation. No SDK/runtime provisioning or Windows signing execution was performed for these follow-ups.Historical migration baseline, not current-head CI: Azure build 1672501 passed against source
410cf2ac6fc517b43be343c508684b6ee476fe4b, before subsequent rebases and runtime/CI changes. It completed 38 successful jobs and 48 test runs with 10,852 passed results. Earlier local macOS arm64 validation covered full Debug solution build, source/extracted CoreCLR arm64 app builds, solution packaging, generator-filter builds, and focused archive-path/timestamp/casing checks. Those results are historical; they were not rerun at the current head.Earlier repair attempts failed before separate corrections and successful validation. In particular, the timestamp-app validation script's overall RID assertion failed even though its build roots succeeded; subsequent offline verification established the intended APK/runtime and incremental-build properties. No current-head CI, performance, Windows signing, or shared-installation immutability certification is claimed.