@@ -272,25 +272,20 @@ ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 \
272272 DOTNET_NOLOGO=1 \
273273 MSBUILDDISABLENODEREUSE=1
274274
275- # First, restore without RID to get all packages
276275RUN set -eux; \
277- echo "--- restore (.NET 10) ---"; \
278- dotnet restore ASC.Web.slnf; \
279- dotnet restore ASC.Migrations.sln
280-
281- # Then build and publish with the target RID
282- RUN set -eux; \
283- echo "--- build/publish (.NET 10) for $TARGETARCH ---"; \
276+ echo "--- build/publish (.NET 10) ---"; \
284277 echo "BUILDPLATFORM=$BUILDPLATFORM TARGETPLATFORM=$TARGETPLATFORM TARGETARCH=$TARGETARCH"; \
285- rid="linux-${TARGETARCH}"; \
286278 \
287- # Build with the RID (uses restored packages from previous step)
288- dotnet build ASC.Web.slnf -c Release --no-restore -m:1 -r "$rid"; \
289- dotnet build ASC.Migrations.sln -c Release --no-restore -m:1 -r "$rid" \
279+ # restore/build solutions (no RID)
280+ dotnet restore ASC.Web.slnf; \
281+ dotnet restore ASC.Migrations.sln; \
282+ dotnet build ASC.Web.slnf -c Release --no-restore -m:1; \
283+ dotnet build ASC.Migrations.sln -c Release --no-restore -m:1 \
290284 --property:OutputPath=${SRC_PATH}/publish/ASC.Migration.Runner/service/; \
291285 \
292- # Publish with the RID
293- dotnet publish ASC.Web.slnf -c Release --no-build --no-restore \
286+ # publish with RID (RID-specific restore happens here)
287+ rid="linux-${TARGETARCH}"; \
288+ dotnet publish ASC.Web.slnf -c Release \
294289 -r "$rid" --self-contained false \
295290 -p PublishProfile=ReleaseProfile \
296291 -p:DebugType=None -p:DebugSymbols=false -p:UseAppHost=false
0 commit comments