Skip to content

Commit 97af3b0

Browse files
davidfowlCopilot
andauthored
Fix Windows bundle build: add Bundle.proj payload step to BuildAndTest 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 <[email protected]>
1 parent be6509a commit 97af3b0

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

eng/clipack/Common.projitems

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@
3838
</Target>
3939

4040
<Target Name="_PublishProject">
41+
<!--
42+
Bundle payload flow:
43+
1. Bundle.proj runs CreateLayout which produces a tar.gz archive (managed runtime, DCP, etc.)
44+
2. Pipeline steps (BuildAndTest.yml, build_sign_native.yml, GitHub Actions) pass BundlePayloadPath to that archive
45+
3. Common.projitems forwards BundlePayloadPath to the CLI publish via AdditionalProperties
46+
4. Aspire.Cli.csproj embeds it as an EmbeddedResource with LogicalName="bundle.tar.gz"
47+
5. BundleService.cs reads the resource at runtime via Assembly.GetManifestResourceStream and extracts with TarReader
48+
-->
49+
<PropertyGroup>
50+
<BundlePayloadPath Condition="'$(BundlePayloadPath)' == ''">$(RepoRoot)artifacts/bundle/aspire-ci-bundlepayload-$(CliRuntime).tar.gz</BundlePayloadPath>
51+
</PropertyGroup>
4152
<ItemGroup>
4253
<AdditionalProperties Include="RuntimeIdentifier=$(CliRuntime)" />
4354
<AdditionalProperties Include="PublishDir=$(OutputPath)" />

eng/pipelines/templates/BuildAndTest.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,20 @@ parameters:
4141
steps:
4242
# Internal pipeline: Build with pack+sign
4343
- ${{ if ne(parameters.runAsPublic, 'true') }}:
44+
# Build bundle payload (aspire-managed) for each target RID before the main build
45+
- ${{ each targetRid in parameters.targetRids }}:
46+
- script: ${{ parameters.dotnetScript }}
47+
msbuild
48+
$(Build.SourcesDirectory)/eng/Bundle.proj
49+
/restore
50+
/p:Configuration=${{ parameters.buildConfig }}
51+
/p:TargetRid=${{ targetRid }}
52+
/p:BundleVersion=ci-bundlepayload
53+
/p:SkipNativeBuild=true
54+
/p:ContinuousIntegrationBuild=true
55+
/bl:${{ parameters.repoLogPath }}/BundlePayload-${{ targetRid }}.binlog
56+
displayName: 🟣Build bundle payload (${{ targetRid }})
57+
4458
- script: ${{ parameters.buildScript }}
4559
-restore -build
4660
-pack

0 commit comments

Comments
 (0)