Expose application artifacts#25723
Conversation
Add public MSBuild item groups for final MaciOS build and publish artifacts so custom targets and CI can consume app bundles, IPA files, PKG installers, and Xcode archives with metadata. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Collapse MaciOS artifact and published artifact item groups into ApplePackageOutput, matching AndroidPackageOutput naming and reducing metadata to the package contract. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Make ApplePackageOutput Signed reflect app code signing only, and expose separate PackageSigned metadata for .pkg installer package signing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Drop Signed and PackageSigned from ApplePackageOutput since Apple builds do not emit parallel signed and unsigned package outputs that need to be distinguished. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Drop AppBundlePath from ApplePackageOutput so the public contract focuses on the final artifact item identity and stable package metadata. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add direct GetApplePackageOutputs coverage using MSBuild item query output for IPA, PKG, app bundle, and xcarchive artifacts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rename the public artifact item group and query target to ApplicationArtifact and GetApplicationArtifacts so the surface can be shared across platforms. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add GetApplicationArtifactsDependsOn so later SDKs such as MAUI can enrich ApplicationArtifact metadata before GetApplicationArtifacts returns items. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Validate that GetApplicationArtifactsDependsOn extension targets can observe platform-produced ApplicationArtifact items before adding metadata, and verify both app and package artifacts receive the augmented metadata. Restore the injected sample project content after the test to avoid leaving dirty files on failure. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Route Publish through GetApplicationArtifacts after _PrePublish so targets appended with GetApplicationArtifactsDependsOn can augment ApplicationArtifact metadata before Publish returns items. Add publish-target coverage that validates a MAUI-like extension sees platform artifacts before updating metadata. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document that GetApplicationArtifactsDependsOn extension targets should update platform-produced ApplicationArtifact items when adding metadata, while only adding new items for additional artifacts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Make Build a mandatory GetApplicationArtifacts dependency instead of part of the overridable GetApplicationArtifactsDependsOn property. Extension targets still run after platform artifacts are produced, and tests now overwrite the property to prove Build cannot be removed while metadata augmentation still applies to GetApplicationArtifacts and Publish. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update ApplicationArtifact target-result examples to use dotnet build with -getTargetResult for GetApplicationArtifacts and Publish. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolve conflict in Xamarin.Shared.targets by keeping the ApplicationArtifact query target and the new PrepareAssemblies targets from main. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Android equivalent: dotnet/android#11674 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Align GetApplicationArtifacts with Android by routing it through a private application artifact creation target that runs Build plus Apple package/archive producers before user metadata extension targets. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
Assert that explicit ApplicationArtifact producer dependencies preserve their existing BuildIpa, CreatePackage, and ArchiveOnBuild gates so GetApplicationArtifacts does not create optional artifacts unless requested. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Route GetApplicationArtifacts directly through mandatory Build before user metadata extension targets, matching the Android contract and removing the private artifact creation wrapper. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #73624bf] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #73624bf] Build passed (Build packages) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [PR Build #73624bf] Build passed (Build macOS tests) ✅Pipeline on Agent |
🔥 [CI Build #73624bf] Test results 🔥Test results❌ Tests failed on VSTS: test results 0 tests crashed, 21 tests failed, 199 tests passed. Failures❌ dotnettests tests (iOS)1 tests failed, 0 tests passed.Failed tests
Html Report (VSDrops) Download ❌ dotnettests tests (MacCatalyst)1 tests failed, 0 tests passed.Failed tests
Html Report (VSDrops) Download ❌ dotnettests tests (macOS)1 tests failed, 0 tests passed.Failed tests
Html Report (VSDrops) Download ❌ dotnettests tests (tvOS)1 tests failed, 0 tests passed.Failed tests
Html Report (VSDrops) Download ❌ linker tests (iOS)15 tests failed, 0 tests passed.Failed tests
Html Report (VSDrops) Download ❌ linker tests (tvOS)1 tests failed, 14 tests passed.Failed tests
Html Report (VSDrops) Download ❌ windows tests1 tests failed, 2 tests passed.Failed tests
Html Report (VSDrops) Download Successes✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Apple platform builds and publishes now expose final artifacts through the shared
@(ApplicationArtifact)item group. This gives custom targets and CI a stable way to discover.app,.ipa,.pkg, and.xcarchiveoutputs without parsing scalar properties, while leaving room for other platforms to use the same item group name.Changes
@(ApplicationArtifact)collectors for app bundles, IPA packages, PKG installers, and Xcode archives.PublishthroughGetApplicationArtifactsafter_PrePublish, so publish-created artifacts run the same metadata extension path beforePublishreturns@(ApplicationArtifact).GetApplicationArtifactsDependsOnso later SDK layers such as .NET MAUI can enrich@(ApplicationArtifact)metadata beforeGetApplicationArtifactsorPublishreturns.Builda mandatoryGetApplicationArtifactsdependency outside the overridableGetApplicationArtifactsDependsOnproperty, so overwriting the property cannot skip platform artifact population.GetApplicationArtifactsDependsOnas a post-build extension point only; Build produces and collects platform artifacts before extension targets enrich the existing@(ApplicationArtifact)items.@(ApplicationArtifact)items when adding metadata, and only add new items for additional artifacts.PackageFormat,IsDirectory,PlatformName, andBundleIdentifier.dotnet build ... -getTargetResultexamples for queryingGetApplicationArtifactsandPublishresults from the command line.GetApplicationArtifactsDependsOnbehavior, and the direct target dependency graph.Validation
xmllint --noout msbuild/Xamarin.Shared/Xamarin.Shared.targets msbuild/Xamarin.Shared/Xamarin.iOS.Common.targetsgit diff --checkmake -C tests/dotnet/UnitTests builddotnet test DotNetUnitTests.csproj --no-build --filter "FullyQualifiedName~PostBuildTest.GetApplicationArtifactsTargetDependenciesTest" --logger "console;verbosity=minimal"