[tests] Copy installer runtime dependencies - #12649
Merged
Merged
Conversation
Make the Xamarin.Installer.AndroidSDK runtime dependencies explicit in Xamarin.Android.Build.Tests so test artifact contents do not depend on another project winning a shared-output race. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is scoped to deterministic dependency inclusion for tests and does not introduce behavioral risk to product code.
Pull request overview
This PR updates the Xamarin.Android.Build.Tests test project to make its runtime dependency closure deterministic by explicitly restoring/copying installer runtime dependencies (rather than relying on shared output ordering from parallel builds).
Changes:
- Add direct
Pollypackage reference to the test project. - Add direct
SharpZipLibpackage reference to the test project.
File summaries
| File | Description |
|---|---|
| src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.csproj | Adds explicit Polly and SharpZipLib package references to ensure the test assembly’s copy-local runtime dependencies are reliably included. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
simonrozsival
approved these changes
Sep 3, 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.
Summary
PollyandSharpZipLibpackage references toXamarin.Android.Build.TestsContext
Azure DevOps build 1579349 failed
AndroidDependenciesTests.InstallAndroidDependenciesTest("GoogleV2", CoreCLR)on Linux, macOS, and Windows becausetest-assemblies/net10.0omittedICSharpCode.SharpZipLib.dllandPolly.dll. The failure surfaced as:Xamarin.Installer.AndroidSDKintentionally excludes/private-assets these runtime dependencies unless its legacyPublicSharpZipLibandPublicPollyswitches are set. Since #12580 madeXamarin.Android.Build.Testsconsume that project directly, the test had accidentally relied onXamarin.Installer.Build.Taskscopying both packages into a shared output directory first. Parallel project builds made that ordering nondeterministic.Direct package references follow the existing explicit-consumer pattern in
Xamarin.Installer.Build.Tasksand ensure NuGet includes both assemblies in the test project's own copy-local set. SettingAdditionalPropertieson theProjectReferencewould only configure the referenced project build and would leave the consuming test project's restore/copy-local intent indirect.Validation
Xamarin.Android.Build.Teststargeting .NET 10ResolvePackageAssetsand confirmed bothPolly.dllandICSharpCode.SharpZipLib.dllareRuntimeCopyLocalItemswithCopyLocal=truegit diff --check