Skip to content

Add ApplicationArtifact support for Windows App SDK - #35973

Open
Redth wants to merge 5 commits into
mainfrom
redth/plan-maui-artifacts-net11
Open

Redth wants to merge 5 commits into
mainfrom
redth/plan-maui-artifacts-net11

Conversation

@Redth

@Redth Redth commented Jun 17, 2026 •

Copy link
Copy Markdown
Member

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

Adds ApplicationArtifact support for modern SDK-style Windows App SDK applications through a new targets-only Microsoft.Maui.ApplicationArtifacts.Windows package.

Artifact metadata is now owned by the platform that produces the final output instead of being inferred by MAUI from project inputs. Android and Apple expose authoritative common metadata in their platform follow-ups:

This PR supplies the missing Windows producer. It reads WinAppSDK's final output properties and item lists rather than searching output directories, de-duplicates normalized paths, excludes obj intermediates, and makes publish-path items available to AfterTargets="Publish" consumers.

Package and consumption

Microsoft.Maui.ApplicationArtifacts.Windows is a normal NuGet dependency package containing only a neutral buildTransitive target. It has no MAUI runtime, Resizetizer, or MAUI build-task dependency.

Microsoft.Maui.Core references it only for Windows target frameworks, and the maui-windows workload includes it. Non-MAUI WinUI, Uno, and other SDK-style Windows App SDK applications can also reference the package directly.

The targets activate only for real, non-design-time Windows App SDK application builds with Exe or WinExe output. Set EnableWindowsApplicationArtifacts=false to opt out.

Windows outputs

The producer supports unpackaged, MSIX, and sparse applications and classifies the final outputs WinAppSDK actually creates:

  • Primary
  • PayloadDirectory
  • Bundle
  • StoreUpload
  • DeploymentManifest
  • Symbols
  • Certificate
  • InstallScript
  • DependencyPackage
  • LandingPage
  • Support

Every item carries common application identity/title/version metadata plus Windows metadata such as PackageFormat, PackageType, PackageVersion, Architecture, RuntimeIdentifier, Signed, BundlePlatforms, EntryPoint, DeploymentDirectory, IsPrimary, and PrimaryArtifact when available.

Packaged metadata comes from the final Appx manifest and preserves unresolved ms-resource: references. Unpackaged metadata comes from the resolved application output. ApplicationIdGuid is emitted only when the effective Windows identity is a GUID.

Classic .wapproj packaging is intentionally deferred because it uses a different packaging pipeline owned outside this repository.

Testing

  • 12 focused package/target tests pass locally against the rebuilt package; Windows-only packaging scenarios run in CI.
  • Direct PackageReference restore of Microsoft.Maui.ApplicationArtifacts.Windows is verified.
  • Synthetic target tests cover unpackaged/MSIX/sparse collection, output classification and de-duplication, inert project shapes, downstream overrides, metadata mapping, and GetApplicationArtifacts;Publish in one MSBuild invocation.
  • Windows CI tests exercise MAUI unpackaged/MSIX Build and Publish plus standalone WinAppSDK unpackaged Build and Publish using a runtime-generated signing certificate where packaging requires it.
  • A Windows CI store-and-sideload scenario requests an MSIX bundle and .appinstaller, then verifies Bundle, StoreUpload, and DeploymentManifest roles.

Issues Fixed

N/A

Enrich platform-produced ApplicationArtifact items with MAUI application metadata via GetApplicationArtifactsDependsOn instead of introducing MAUI-specific artifact item groups.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 35973

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35973"

@github-actions github-actions Bot added the area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging label Jun 17, 2026
Redth and others added 2 commits June 17, 2026 16:02
Document that platform build/artifact-production steps populate ApplicationArtifact items before MAUI metadata enrichment.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@kubaflo kubaflo 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.

Multi-Model Review — PR #35973

Verdict: ❌ NEEDS_CHANGES
Confidence: High (unanimous across all 4 models)

All 4 models independently identified issues that should be addressed before merging.

Model agreement: gemini (NEEDS_CHANGES/1), gpt-5.5 (NEEDS_CHANGES/1), opus-4.6 (NEEDS_CHANGES/1), opus-4.8 (NEEDS_CHANGES/2)

Findings: 4 unique issues identified.

<ApplicationIdGuid>11111111-2222-3333-4444-555555555555</ApplicationIdGuid>
<ApplicationDisplayVersion>2.3</ApplicationDisplayVersion>
<ApplicationVersion>42</ApplicationVersion>
</PropertyGroup>

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.

The relative path $(MSBuildThisFileDirectory)..\..\..\ assumes the test directory is located within the MAUI repository bin/ folder. However, on Azure Pipelines CI, TestDirectory is located under AGENT_TEMPDIRECTORY (e.g., .../test-dir/ApplicationArtifactsAreEnrichedWithMauiMetadata/). As a result, traversing up 3 directories points to AGENT_TEMPDIRECTORY/src/Workload/... instead of the repository, causing MSB4019 missing import errors and failing the integration tests.

<ApplicationDisplayVersion>2.3</ApplicationDisplayVersion>
<ApplicationVersion>42</ApplicationVersion>
</PropertyGroup>
<Import Project="$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..\src\Workload\Microsoft.Maui.Sdk\Sdk\Microsoft.Maui.Sdk.After.targets'))" />

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.

This import is rooted at the generated test project's MSBuildThisFileDirectory and walks up three directories to find src/Workload. That happens to work for local fallback TestDirectory under the repo's bin/test-dir, but in Azure Pipelines TestEnvironment.GetTestDirectoryRoot() uses AGENT_TEMPDIRECTORY/test-dir, so ......\src does not point at the MAUI checkout and the new Build integration test cannot import Microsoft.Maui.Sdk.After.targets. The current CI failures in the Build integration lanes are consistent with this PR-introduced test path issue.

(found by: 5, 4)

<Target Name="SeedApplicationArtifacts">
<ItemGroup>
<ApplicationArtifact Include="$(MSBuildProjectDirectory)/artifacts/platform/android/MyArtifactApp-Signed.apk">
<PackageFormat>apk</PackageFormat>

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.

The explicit <Import Project="$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\\..\\..\\src\\Workload\\...'))" /> assumes the project directory is 3 levels deep inside the repo root. Locally this resolves from <repo>/bin/test-dir/<testname>/ to <repo>/. In CI, TestDirectory is under $AGENT_TEMPDIRECTORY/test-dir/<testname>/, so 3 parent traversals land in the agent temp directory—not the repo. The targets file won't exist there, causing a build error. This is the likely cause of the CI 'Build integration tests' failures on both macOS and Windows.

Lines="@(ApplicationArtifact->'%(Filename)%(Extension)|%(PackageFormat)|%(ApplicationTitle)|%(ApplicationName)|%(ApplicationId)|%(ApplicationIdGuid)|%(ApplicationDisplayVersion)|%(ApplicationVersion)|%(Signed)|%(PackageId)|%(PlatformName)|%(BundleIdentifier)')"
Overwrite="true" />
</Target>
<Target Name="WritePublishApplicationArtifactsMetadata" DependsOnTargets="SeedApplicationArtifacts;_AddMauiApplicationArtifactMetadata">

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.

Both WriteGetApplicationArtifactsMetadata and WritePublishApplicationArtifactsMetadata depend directly on SeedApplicationArtifacts;_AddMauiApplicationArtifactMetadata, so they exercise the metadata target in isolation rather than through a real GetApplicationArtifacts/Publish invocation; the actual wiring is only checked indirectly by the string Assert.Contains on the depends-on file (line 178). The Publish variant therefore adds no coverage beyond the Get variant. This is understandable while the platform GetApplicationArtifacts target is unavailable in net11, but consider collapsing the duplicate target (or asserting the real wiring) once the platform producers land.

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Expert Review — 2 findings

See inline comments for details.

<ApplicationDisplayVersion>2.3</ApplicationDisplayVersion>
<ApplicationVersion>42</ApplicationVersion>
</PropertyGroup>
<Import Project="$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..\src\Workload\Microsoft.Maui.Sdk\Sdk\Microsoft.Maui.Sdk.After.targets'))" />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[major] Build & MSBuild — This import is resolved relative to the generated test project. In CI TestDirectory is under $(AGENT_TEMPDIRECTORY)/test-dir, so $(MSBuildThisFileDirectory)......\src... points outside the checkout (for example /home/vsts/work/src/...) and the test fails with MSB4019 before it can validate the target. Resolve the import from TestEnvironment.GetMauiDirectory()/a repo-root property instead of the temp project location.

</ApplicationArtifact>
</ItemGroup>
</Target>
<Target Name="WriteGetApplicationArtifactsMetadata" DependsOnTargets="SeedApplicationArtifacts;_AddMauiApplicationArtifactMetadata">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[moderate] Regression Prevention — The test target depends on _AddMauiApplicationArtifactMetadata directly, so it validates the private target body rather than the GetApplicationArtifactsDependsOn extension path this PR adds. A regression where the hook is not actually invoked by GetApplicationArtifacts/Publish could still pass because lines 157 and 167 call the target manually. Seed the item, invoke the targets through $(GetApplicationArtifactsDependsOn)/the public artifacts target, and assert the metadata after that path runs.

@MauiBot MauiBot added s/agent-fix-win AI found a better alternative fix than the PR s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Jun 19, 2026
MauiBot

This comment was marked as outdated.

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Expert Review — 2 findings

See inline comments for details.

<ApplicationDisplayVersion>2.3</ApplicationDisplayVersion>
<ApplicationVersion>42</ApplicationVersion>
</PropertyGroup>
<Import Project="$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..\src\Workload\Microsoft.Maui.Sdk\Sdk\Microsoft.Maui.Sdk.After.targets'))" />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

❌ Error — This import is resolved relative to the generated temp test project via $(MSBuildThisFileDirectory), not relative to the MAUI repo. In CI, TestDirectory is under AGENT_TEMPDIRECTORY, so ..\..\..\src\Workload\... points outside /home/vsts/work/1/s and the test fails before exercising the PR fix. Please build the import path from TestEnvironment.GetMauiDirectory() or otherwise pass an absolute repo-rooted path into the generated project.

</ApplicationArtifact>
</ItemGroup>
</Target>
<Target Name="WriteGetApplicationArtifactsMetadata" DependsOnTargets="SeedApplicationArtifacts;_AddMauiApplicationArtifactMetadata">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

⚠️ Warning — The test drives the private _AddMauiApplicationArtifactMetadata target directly, so it can pass even if the public $(GetApplicationArtifactsDependsOn) hook is not honored by GetApplicationArtifacts/Publish or runs in the wrong order. Please exercise the public target path, or make this target depend on $(GetApplicationArtifactsDependsOn), so the regression test covers the actual integration contract added in Microsoft.Maui.Sdk.After.targets.

@MauiBot MauiBot added s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates and removed s/agent-fix-win AI found a better alternative fix than the PR labels Jun 19, 2026
MauiBot

This comment was marked as outdated.

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Expert Review — 2 findings

See inline comments for details.

<ApplicationDisplayVersion>2.3</ApplicationDisplayVersion>
<ApplicationVersion>42</ApplicationVersion>
</PropertyGroup>
<Import Project="$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..\src\Workload\Microsoft.Maui.Sdk\Sdk\Microsoft.Maui.Sdk.After.targets'))" />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

❌ Error — This import resolves from the generated temp project directory, not the MAUI repo root. In CI TestDirectory is under the agent temp/test-dir (and locally under bin/test-dir), so ..\\..\\..\\src\\Workload... points at a non-existent sibling src tree and the test will fail before exercising the target. Build the path from TestEnvironment.GetMauiDirectory() or pass the repo-root path as an MSBuild property instead.

</ApplicationArtifact>
</ItemGroup>
</Target>
<Target Name="WriteGetApplicationArtifactsMetadata" DependsOnTargets="SeedApplicationArtifacts;_AddMauiApplicationArtifactMetadata">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

⚠️ Warning — The test seeds fake ApplicationArtifact items and directly invokes the private _AddMauiApplicationArtifactMetadata target, so it does not prove the public GetApplicationArtifacts/publish extension path actually returns enriched platform artifacts. A regression in target ordering or platform artifact production could still ship while this test passes; prefer invoking the real public targets or depending through $(GetApplicationArtifactsDependsOn) in the harness.

MauiBot

This comment was marked as outdated.

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Expert Review — 5 findings

See inline comments for details.

<ApplicationDisplayVersion>2.3</ApplicationDisplayVersion>
<ApplicationVersion>42</ApplicationVersion>
</PropertyGroup>
<Import Project="$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..\src\Workload\Microsoft.Maui.Sdk\Sdk\Microsoft.Maui.Sdk.After.targets'))" />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

❌ [critical] Build & MSBuild — Import path is broken on CI and on Linux/macOS

$(MSBuildThisFileDirectory) evaluates to the generated project directory under the integration-test temp root, not the MAUI repo root. On CI that makes ..\..\..\src\Workload\... resolve outside the checkout, and on Linux/macOS the backslashes are literal path characters rather than directory separators. The test can hard-fail before exercising the metadata target.

Resolve the targets file from C# using TestEnvironment.GetMauiDirectory() and inject/pass an absolute path with platform-correct separators.

<ApplicationDisplayVersion>2.3</ApplicationDisplayVersion>
<ApplicationVersion>42</ApplicationVersion>
</PropertyGroup>
<Import Project="$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..\src\Workload\Microsoft.Maui.Sdk\Sdk\Microsoft.Maui.Sdk.After.targets'))" />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

⚠️ [major] Regression Prevention — Test double-imports a targets file already imported by the MAUI workload

The generated maui template project already imports Microsoft.Maui.Sdk.After.targets through the installed workload. The explicit source import can append _AddMauiApplicationArtifactMetadata a second time and makes the GetApplicationArtifactsDependsOn string assertion ambiguous. Prefer a minimal non-MAUI MSBuild project for this unit-style target test, or otherwise ensure the source targets are imported exactly once.

</ApplicationArtifact>
</ItemGroup>
</Target>
<Target Name="WriteGetApplicationArtifactsMetadata" DependsOnTargets="SeedApplicationArtifacts;_AddMauiApplicationArtifactMetadata">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

⚠️ [major] Regression Prevention — Test calls the private implementation target instead of the public hook

WriteGetApplicationArtifactsMetadata and WritePublishApplicationArtifactsMetadata depend directly on _AddMauiApplicationArtifactMetadata, so the test would still pass if GetApplicationArtifactsDependsOn were removed, misspelled, or pointed at the wrong target. Invoke the public target/dependency chain and verify the enriched @(ApplicationArtifact) items are returned through that path.

Assert.Contains("_AddMauiApplicationArtifactMetadata", File.ReadAllText(dependsOnFile), StringComparison.Ordinal);
AssertApplicationArtifactMetadata(File.ReadAllLines(getArtifactsFile));

Assert.True(DotnetInternal.Build(projectFile, "Debug", target: "WritePublishApplicationArtifactsMetadata", framework: $"{DotNetCurrent}-android", properties: BuildProps, output: _output),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

⚠️ [moderate] Logic and Correctness — Publish coverage duplicates the GetApplicationArtifacts path

The publish assertion builds a custom target with the same direct dependency on _AddMauiApplicationArtifactMetadata, so it does not verify whether the real Publish path triggers artifact enrichment. Either document and test that Publish consumes the same GetApplicationArtifactsDependsOn extension path, or add the missing publish hook and verify it through the real publish target.

</ItemGroup>

<PropertyGroup>
<GetApplicationArtifactsDependsOn>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

💡 [minor] Build & MSBuild — Consider guarding the dependency-chain extension

The property group appends _AddMauiApplicationArtifactMetadata for every project importing Microsoft.Maui.Sdk.After.targets, including configurations such as UseMauiEssentials=true that may never produce application artifacts. The target is a no-op when @(ApplicationArtifact) is empty, so this is likely harmless, but a UseMaui/artifact-intent condition or documentation would make the global extension explicit.

MauiBot

This comment was marked as outdated.

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Expert Review — 2 findings

See inline comments for details.

<ApplicationDisplayVersion>2.3</ApplicationDisplayVersion>
<ApplicationVersion>42</ApplicationVersion>
</PropertyGroup>
<Import Project="$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..\src\Workload\Microsoft.Maui.Sdk\Sdk\Microsoft.Maui.Sdk.After.targets'))" />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[critical] Build & MSBuild — This import resolves from $(MSBuildThisFileDirectory), which is the generated temp test project directory, not the repo root. In CI the path walks up from the temp project and can miss src/Workload/Microsoft.Maui.Sdk/Sdk/Microsoft.Maui.Sdk.After.targets, causing MSB4019 before the regression test can run. Use the repo MAUI directory/test environment path instead of a project-relative path.

</ApplicationArtifact>
</ItemGroup>
</Target>
<Target Name="WriteGetApplicationArtifactsMetadata" DependsOnTargets="SeedApplicationArtifacts;_AddMauiApplicationArtifactMetadata">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[major] Regression Prevention/Test Coverage — The test directly depends on the private _AddMauiApplicationArtifactMetadata target here and again in WritePublishApplicationArtifactsMetadata, so it can pass even if the production GetApplicationArtifactsDependsOn hook is not actually used by GetApplicationArtifacts/Publish. Exercise the public depends-on path rather than invoking the private target directly.

MauiBot

This comment was marked as outdated.

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Expert Review — 1 findings

See inline comments for details.

<ApplicationDisplayVersion>2.3</ApplicationDisplayVersion>
<ApplicationVersion>42</ApplicationVersion>
</PropertyGroup>
<Import Project="$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..\src\Workload\Microsoft.Maui.Sdk\Sdk\Microsoft.Maui.Sdk.After.targets'))" />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[major] Build & MSBuild / integration test correctness — This import resolves relative to the temporary test project directory, not the MAUI repo root. In CI TestDirectory is under AGENT_TEMPDIRECTORY/test-dir, and locally it is under bin/test-dir, so $(MSBuildThisFileDirectory)..\..\..\src\Workload\... points at a non-existent src sibling and the test will fail before exercising the metadata target. It can also double-import Microsoft.Maui.Sdk.After.targets when the SDK already imports it. Use TestEnvironment.GetMauiDirectory() to build an absolute path if the test must import source targets, or rely on the SDK import from the built workload.

MauiBot

This comment was marked as outdated.

@kubaflo

kubaflo commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Adversarial merge-safety review

Verdict: not safe to merge yet. Reviewed head 860afcbc4a42c4ae4f994d7612a891fe04426ccd independently with GPT-5.6 Terra and GPT-5.4, plus current CI and test-surface inspection.

Evidence

  • The PR currently has merge conflicts and CHANGES_REQUESTED.
  • Required maui-pr is red; the recorded build is no longer available through the public timeline API, so the failing Release Helix leg and cancelled macOS pack leg cannot be responsibly cleared.
  • The Windows-specific integration scenarios cannot be executed on this macOS host. Existing tests use separate build/publish invocations and therefore miss the one-process target-ordering failure below.

Blocking concerns

  1. For packaged apps, GetApplicationArtifacts and the publish hook both depend on _CollectMicrosoftMauiWindowsApplicationArtifacts. MSBuild executes a target once per project instance, so GetApplicationArtifacts;Publish can skip recollection after GenerateMsixPackage and expose stale or missing publish artifacts. The PR adds a distinct refresh only for unpackaged apps.
  2. Automatic build/publish collectors invoke the private collector directly and bypass downstream targets appended through the public GetApplicationArtifactsDependsOn extension hook, so consumer enrichment can be absent from publish-time artifacts.
  3. The integration-test feed helper copies the new package only when extra-packages is missing or empty. A reused non-empty feed can omit the package under test and make reruns depend on stale disk state.

Before merge: resolve conflicts, add a distinct packaged publish refresh, exercise GetApplicationArtifacts;Publish in one MSBuild process, preserve the public extension chain, make test-feed population deterministic, and obtain a fresh conclusive Windows CI run.

@kubaflo

kubaflo commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

could you please resolve conflicts

@kubaflo

This comment has been minimized.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@github-actions github-actions Bot 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.

Expert Review — 3 findings

Reviewed commit 860afcb.

See inline comments for details.

}

static string WithDirectorySeparator(string path) =>
path.EndsWith(Path.DirectorySeparatorChar, StringComparison.Ordinal) ? path : path + Path.DirectorySeparatorChar;

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.

[major] Logic and Correctness Verification - Path.DirectorySeparatorChar is a char, but the two-argument string.EndsWith overload taking StringComparison requires a string. There is an EndsWith(char) overload, but no EndsWith(char, StringComparison) overload or matching extension in this project. Consequently the entire integration-test assembly fails to compile with CS1503 on every host, before platform guards or test filters can run. Use path.EndsWith(Path.DirectorySeparatorChar) or convert the separator to a string.


internal static class Program
{
[STAThread]

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.

[moderate] Regression Prevention and Test Coverage - The generated standalone application's Program.cs uses [STAThread] without using System, while its hand-written SDK project does not enable ImplicitUsings. The copied template-test Directory.Build.props only configures warnings, and the test-root props prevent inheriting repository settings. The generated project therefore cannot resolve STAThreadAttribute, so this Windows test fails at Build before validating standalone package consumption or Publish. Qualify the attribute as [System.STAThread], add the using, or enable implicit usings in the generated project.

Assert.True(
DotnetInternal.Run("msbuild", $"\"{projectFile}\" -t:WriteApplicationArtifacts -v:minimal", output: _output),
"Unable to execute the inert Windows ApplicationArtifact fixture.");
Assert.True(!File.Exists(artifactsFile) || new FileInfo(artifactsFile).Length == 0);

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.

[moderate] Regression Prevention and Test Coverage - This inert-project theory supplies neither TargetDir nor an existing executable, so an unpackaged collector produces no artifacts even if the activation, design-time, or BuildingProject guards are bypassed. The empty-output assertion therefore cannot detect those guards regressing for an application with existing build outputs. Seed an executable and TargetDir, verify that an otherwise-identical enabled case collects them, and assert that each disabled case remains empty.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Oct 18, 2026
@MauiBot

MauiBot commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

PR Test Gate

@Redth — existing-test verification; Setup did not capture a tested commit.

Result INCONCLUSIVE Platform Android


🧪 Gate analysis — click to expand

⚠ Inconclusive. The PR could not be merged with its target branch; no tests ran.

No interpretable test-group summary was produced. No additional test execution is inferred.

Setup did not capture a verified PR head; no commit is claimed as tested.

No immutable without-fix baseline was prepared.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants