Skip to content

Fix Windows bundle build: add Bundle.proj payload step to ADO pipeline#14650

Merged
davidfowl merged 1 commit intorelease/13.2from
davidfowl/fix-bundle-windows
Feb 24, 2026
Merged

Fix Windows bundle build: add Bundle.proj payload step to ADO pipeline#14650
davidfowl merged 1 commit intorelease/13.2from
davidfowl/fix-bundle-windows

Conversation

@davidfowl
Copy link
Copy Markdown
Contributor

Description

The Windows build in BuildAndTest.yml was missing the Bundle.proj step that Linux/macOS have in build_sign_native.yml. This meant the Windows native CLI was being produced without the embedded bundle payload (aspire-managed), resulting in an unbundled CLI binary.

Changes

  • eng/pipelines/templates/BuildAndTest.yml — Added Bundle.proj payload build step per target RID before the main build (matching the pattern in build_sign_native.yml)
  • eng/clipack/Common.projitems — Default BundlePayloadPath to the convention path when not explicitly set, and fail the build with a clear error if the payload is missing

The convention-based default is needed because BuildAndTest.yml builds multiple RIDs (win-x64:win-arm64) in a single job and cannot pass a per-RID BundlePayloadPath. When BundlePayloadPath is passed explicitly (GitHub Actions, build_sign_native.yml), it takes priority.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No — pipeline/build infrastructure change
  • Did you add public API?
    • Yes
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

Copilot AI review requested due to automatic review settings February 24, 2026 17:19
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 24, 2026

🚀 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/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14650

Or

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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Ensures Windows native CLI builds produced by the ADO BuildAndTest.yml pipeline include the embedded Aspire-managed bundle payload (matching the existing Linux/macOS native build pipeline behavior).

Changes:

  • Add a per-RID Bundle.proj payload build step ahead of the main internal build in BuildAndTest.yml.
  • In CLI packaging, default BundlePayloadPath to the convention-based artifacts location and fail fast with a clearer error when missing.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
eng/pipelines/templates/BuildAndTest.yml Builds the bundle payload for each target RID before the main internal build, so Windows packaging can embed it.
eng/clipack/Common.projitems Adds a default BundlePayloadPath convention and validates the payload exists during _PublishProject.

<BundlePayloadPath Condition="'$(BundlePayloadPath)' == ''">$(RepoRoot)artifacts\bundle\aspire-ci-bundlepayload-$(CliRuntime).tar.gz</BundlePayloadPath>
</PropertyGroup>
<Error Condition="!Exists('$(BundlePayloadPath)')"
Text="Bundle payload not found at '$(BundlePayloadPath)'. Run Bundle.proj with /p:TargetRid=$(CliRuntime) first." />
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

The default BundlePayloadPath points to an archive named aspire-ci-bundlepayload-$(CliRuntime).tar.gz, but the error text suggests running Bundle.proj with only /p:TargetRid=.... Bundle.proj defaults BundleVersion to $(VersionPrefix)-dev, so that command won’t produce a file at the default path unless /p:BundleVersion=ci-bundlepayload (or an explicit BundlePayloadPath) is also provided. Please update the error guidance to mention the required BundleVersion value or instruct users to pass BundlePayloadPath to the produced archive.

Suggested change
Text="Bundle payload not found at '$(BundlePayloadPath)'. Run Bundle.proj with /p:TargetRid=$(CliRuntime) first." />
Text="Bundle payload not found at '$(BundlePayloadPath)'. Run Bundle.proj with /p:TargetRid=$(CliRuntime) /p:BundleVersion=ci-bundlepayload, or set /p:BundlePayloadPath to the produced archive." />

Copilot uses AI. Check for mistakes.
@davidfowl davidfowl force-pushed the davidfowl/fix-bundle-windows branch from dcbed82 to 27c0c4a Compare February 24, 2026 17:36
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 24, 2026

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit db906dd:

Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AgentInitCommand_WithMalformedMcpJson_ShowsErrorAndExitsNonZero ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
CreateAndDeployToDockerCompose ▶️ View Recording
CreateAndDeployToDockerComposeInteractive ▶️ View Recording
CreateAndPublishToKubernetes ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateEmptyAppHostProject ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateStartWaitAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ❌ Upload failed

📹 Recordings uploaded automatically from CI run #22365390078

Copy link
Copy Markdown
Member

@joperezr joperezr left a comment

Choose a reason for hiding this comment

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

NIT: I looked at the Bundle.proj, and it doesn't look like it has an Error task in case the payload is missing. Should we add that?


<Target Name="_PublishProject">
<PropertyGroup>
<BundlePayloadPath Condition="'$(BundlePayloadPath)' == ''">$(RepoRoot)artifacts\bundle\aspire-ci-bundlepayload-$(CliRuntime).tar.gz</BundlePayloadPath>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

NIT: We should consider using forward-slashes so this works well in Linux.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also NIT: might be good to add a comment above this property group to explain how the flow works, like:

   1. Bundle.proj → runs CreateLayout which produces a tar.gz archive of the managed runtime, DCP, dashboard, etc.
   2. Pipeline steps (BuildAndTest.yml, build_sign_native.yml, GitHub Actions) → pass BundlePayloadPath pointing to that archive
   3. eng/clipack/Common.projitems → forwards BundlePayloadPath as an AdditionalProperties item to the CLI publish
   4. Aspire.Cli.csproj → embeds it as an EmbeddedResource with LogicalName="bundle.tar.gz"
   5. BundleService.cs → at runtime, reads the resource via Assembly.GetManifestResourceStream("bundle.tar.gz") and extracts it using .NET's TarReader

might be useful in the future when trying to understand how this works

Copy link
Copy Markdown
Member

@joperezr joperezr left a comment

Choose a reason for hiding this comment

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

Minor comments but looks good otherwise

@davidfowl davidfowl force-pushed the davidfowl/fix-bundle-windows branch from 27c0c4a to 047ab6f Compare February 24, 2026 18:51
…t pipeline

The Windows build in BuildAndTest.yml was missing the Bundle.proj step
that Linux/macOS have in build_sign_native.yml, producing an unbundled
CLI binary.

- Add Bundle.proj payload build step per target RID before the main build
- Default BundlePayloadPath to convention path in Common.projitems
- Fail the build with clear error if bundle payload is missing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@davidfowl davidfowl force-pushed the davidfowl/fix-bundle-windows branch from 047ab6f to db906dd Compare February 24, 2026 18:52
@davidfowl davidfowl merged commit 97af3b0 into release/13.2 Feb 24, 2026
675 of 679 checks passed
@davidfowl davidfowl deleted the davidfowl/fix-bundle-windows branch February 24, 2026 19:33
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Feb 24, 2026
Copilot AI pushed a commit that referenced this pull request Mar 10, 2026
…t pipeline (#14650)

The Windows build in BuildAndTest.yml was missing the Bundle.proj step
that Linux/macOS have in build_sign_native.yml, producing an unbundled
CLI binary.

- Add Bundle.proj payload build step per target RID before the main build
- Default BundlePayloadPath to convention path in Common.projitems
- Fail the build with clear error if bundle payload is missing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants