Repository navigation
[build] Remove unused Mono.Unix dependency - #13549
Merged
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
🟢 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
enabled auto-merge (squash)
November 13, 2026 16:01
jonathanpeppers
approved these changes
Nov 13, 2026
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.
Context: #13513
The legacy Android SDK installer used
Mono.Unix.Native.Syscall.chmodto 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
chmoduses remain unchanged.Testing
make prepare && make all— preparation and solution build passed; workload configuration failed becauseMono.Android.xmlwas 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.