Skip to content

Conversation

@eerhardt
Copy link
Member

Description

Set both RuntimeIdentifier/ContainerRuntimeIdentifier or RuntimeIdentifiers/ContainerRuntimeIdentifiers when building dotnet containers. This way the application is published correctly - for example for native AOT.

Set both RuntimeIdentifier/ContainerRuntimeIdentifier or RuntimeIdentifiers/ContainerRuntimeIdentifiers when building dotnet containers. This way the application is published correctly - for example for native AOT.
@github-actions
Copy link
Contributor

github-actions bot commented Nov 12, 2025

🚀 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 -- 12936

Or

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

Copilot finished reviewing on behalf of eerhardt November 12, 2025 20:00
Copy link
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

This PR enhances container image building for .NET projects by setting both RuntimeIdentifier/RuntimeIdentifiers and ContainerRuntimeIdentifier/ContainerRuntimeIdentifiers MSBuild properties when building dotnet containers. This ensures applications are published correctly for scenarios like Native AOT compilation. Additionally, the PR removes the ContainerRegistry property from several playground TestShop project files.

Key changes:

  • Sets RuntimeIdentifier alongside ContainerRuntimeIdentifier for single-platform builds
  • Sets RuntimeIdentifiers alongside ContainerRuntimeIdentifiers for multi-platform builds
  • Removes unused ContainerRegistry property from three TestShop playground projects

Reviewed Changes

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

File Description
src/Aspire.Hosting/Publishing/ResourceContainerImageBuilder.cs Adds RuntimeIdentifier/RuntimeIdentifiers properties to dotnet publish command for both single and multi-platform builds
playground/TestShop/MyFrontend/MyFrontend.csproj Removes ContainerRegistry property from project file
playground/TestShop/CatalogService/CatalogService.csproj Removes ContainerRegistry property from project file
playground/TestShop/BasketService/BasketService.csproj Removes ContainerRegistry property from project file

<PropertyGroup>
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
<UserSecretsId>f0611710-1eab-4ff6-a476-9610bb7a8416</UserSecretsId>
<ContainerRegistry>localhost:5001</ContainerRegistry>
Copy link
Member

Choose a reason for hiding this comment

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

Why does this need to be removed?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants