Skip to content

Commit 85dc461

Browse files
committed
ci: fix pack step to restore all RIDs before packaging
The pack step was failing with NETSDK1047 because it ran with --no-build --no-restore, but the project.assets.json only had the last RID from the publish loop. Tool packaging with ToolPackageRuntimeIdentifiers needs assets for ALL RIDs. Fix: - Add restore without -r flag before pack (restores all RIDs) - Remove --no-build so pack can build each RID package
1 parent 18a4bb1 commit 85dc461

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/validate-and-package.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,13 @@ jobs:
150150
shell: pwsh
151151
run: |
152152
New-Item -ItemType Directory -Path out/nupkg -Force | Out-Null
153+
154+
# Restore for all RIDs so pack can build packages for each
155+
dotnet restore CosmosDBShell/CosmosDBShell.csproj `
156+
--configfile .github/nuget.github.config
157+
153158
dotnet pack CosmosDBShell/CosmosDBShell.csproj `
154159
--configuration $env:BUILD_CONFIGURATION `
155-
--no-build `
156160
--no-restore `
157161
--output out/nupkg `
158162
/p:PackageVersion=${{ steps.version.outputs.package_version }} `

0 commit comments

Comments
 (0)