镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[build] Remove unused Mono.Unix dependency - #13549

Merged
simonrozsival merged 1 commit into
mainfrom
simonrozsival-mono-unix-removal
Nov 13, 2026
Merged

simonrozsival merged 1 commit into
mainfrom
simonrozsival-mono-unix-removal

Conversation

@simonrozsival

@simonrozsival simonrozsival commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Context: #13513

The legacy Android SDK installer used Mono.Unix.Native.Syscall.chmod to set file permissions. #13513 removed that installer in favor of the Android CLI, removing the last product call to Mono.Unix. The shared MSBuild references still restore the package, and the build still copies and packages its managed and native libraries even though there are no remaining callers.

Remove the package reference and version properties, the native-library copy and macOS universal-library build, the SDK packaging and signing entries, and the obsolete configuration and test import. This removes the dependency; it does not replace all Unix interop with .NET APIs. Existing libc and chmod uses remain unchanged.

Testing

  • make prepare && make all — preparation and solution build passed; workload configuration failed because Mono.Android.xml was missing.
  • make leeroy MSBUILD_ARGS=-p:GenerateDocumentationFile=true — passed, including extra API levels and local workload configuration.
  • dotnet test tests/Microsoft.Android.Build.BaseTasks-Tests/Microsoft.Android.Build.BaseTasks-Tests.csproj -v minimal — 158 passed, 4 skipped.
  • ./dotnet-local.sh test bin/TestDebug/net11.0/Xamarin.Android.Build.Tests.dll --filter 'FullyQualifiedName=Xamarin.Android.Build.Tests.BuildTest2.BuildBasicApplication' -v minimal — 9 passed.
  • ./dotnet-local.sh pack build-tools/create-packs/Microsoft.Android.Sdk.proj -c Debug -p:HostOS=Darwin -o /Users/simon/.copilot/session-state/102c58d6-5a23-4875-9b1a-8df8d472a8aa/files/sdk-packs -v minimal — passed.
  • ./dotnet-local.sh pack build-tools/create-packs/Microsoft.Android.Sdk.proj -c Debug -p:HostOS=Linux -o /Users/simon/.copilot/session-state/102c58d6-5a23-4875-9b1a-8df8d472a8aa/files/sdk-packs -v minimal --no-restore — passed.
  • ./dotnet-local.sh pack build-tools/create-packs/Microsoft.Android.Sdk.proj -c Debug -p:HostOS=Windows -o /Users/simon/.copilot/session-state/102c58d6-5a23-4875-9b1a-8df8d472a8aa/files/sdk-packs -v minimal --no-restore — passed.

The three SDK packs and their symbol packages contain no Mono.Unix assets. Linux and Windows packs were built on macOS, not tested on those hosts. Device tests were not run because no Android device was connected.

The last Mono.Unix call was removed with the legacy installer in
#13513.  The shared package reference and native library packaging no
longer serve any callers.

Remove the dependency, its copy and signing steps, native library
assembly, and obsolete references.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 13, 2026 11:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the removal of the unused Mono.Unix dependency and related build tooling.

No open issues 🎉

What changed in this PR

Removes the unused Mono.Unix dependency from .NET for Android’s build tooling after #13513 removed its last product use in the legacy installer. Existing libc and chmod operations remain unchanged.

Changes:

  • Removes the shared package reference and version properties.
  • Deletes Mono.Unix native-library build steps, configuration, and packaging entries.
  • Cleans up an unused test import and an obsolete documentation reference.
File Description
tests/​MSBuildDeviceIntegration/​Tests/​LocalizationTests.cs Removes the unused Mono.Unix namespace import.
src/​Xamarin.Android.Build.Tasks/​Xamarin.Android.Build.Tasks.targets Removes Mono.Unix asset copying and native-build dependency.
src/​Xamarin.Android.Build.Tasks/​Resources/​Mono.Unix.dll.config Deletes obsolete native-library mappings.
src/​Microsoft.Android.Build.BaseTasks/​MSBuildReferences.projitems Removes the shared Mono.Unix package reference and version.
src/​Microsoft.Android.Build.BaseTasks/​HexUtilities.cs Updates a comment to stop naming the removed dependency.
Directory.Build.props Removes the Mono.Unix version property.
build-tools/​Xamarin.Android.Tools.BootstrapTasks/​Xamarin.Android.Tools.BootstrapTasks.csproj Removes the native-build import and build hook.
build-tools/​scripts/​MonoUnixNative.targets Deletes Mono.Unix native-library validation, merging, and copying targets.
build-tools/​installers/​create-installers.targets Removes Mono.Unix packaging and signing entries and associated extension properties.
build-tools/​debian-metadata/​rules Removes the obsolete Mono.Unix cleanup command.

Review effort: Balanced

@simonrozsival simonrozsival added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Nov 13, 2026
@simonrozsival
simonrozsival enabled auto-merge (squash) November 13, 2026 16:01
@simonrozsival
simonrozsival merged commit b90c257 into main Nov 13, 2026
41 checks passed
@simonrozsival
simonrozsival deleted the simonrozsival-mono-unix-removal branch November 13, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants