Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion playground/TestShop/BasketService/BasketService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<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?

<ContainerRepository>basket-service</ContainerRepository>
<ContainerBaseImage>mcr.microsoft.com/dotnet/aspnet:8.0</ContainerBaseImage>
</PropertyGroup>
Expand Down
1 change: 0 additions & 1 deletion playground/TestShop/CatalogService/CatalogService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
<UserSecretsId>16965dbf-c1f8-4682-b7d8-e250ac520544</UserSecretsId>
<LangVersion>preview</LangVersion>
<ContainerRegistry>localhost:5001</ContainerRegistry>
<ContainerRepository>catalog-service</ContainerRepository>
<ContainerBaseImage>mcr.microsoft.com/dotnet/aspnet:8.0</ContainerBaseImage>
</PropertyGroup>
Expand Down
1 change: 0 additions & 1 deletion playground/TestShop/MyFrontend/MyFrontend.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
<ContainerRegistry>localhost:5001</ContainerRegistry>
<ContainerRepository>my-frontend</ContainerRepository>
<ContainerBaseImage>mcr.microsoft.com/dotnet/aspnet:8.0</ContainerBaseImage>
<!-- Razor tooling sometimes raises this warning. Don't make it an error. -->
Expand Down
11 changes: 7 additions & 4 deletions src/Aspire.Hosting/Publishing/ResourceContainerImageBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,19 +273,22 @@ private async Task<bool> ExecuteDotnetPublishAsync(IResource resource, Container

if (options.TargetPlatform is not null)
{
// Use the appropriate MSBuild property based on the number of RIDs
// Use the appropriate MSBuild properties based on the number of RIDs
var runtimeIds = options.TargetPlatform.Value.ToMSBuildRuntimeIdentifierString();
var ridArray = runtimeIds.Split(';');

if (ridArray.Length == 1)
{
// Single platform - use ContainerRuntimeIdentifier
// Single platform - use RuntimeIdentifier/ContainerRuntimeIdentifier
arguments += $" /p:RuntimeIdentifier=\"{ridArray[0]}\"";
arguments += $" /p:ContainerRuntimeIdentifier=\"{ridArray[0]}\"";
}
else
{
// Multiple platforms - use RuntimeIdentifiers
arguments += $" /p:RuntimeIdentifiers=\"{runtimeIds}\"";
// Multiple platforms - use RuntimeIdentifiers/ContainerRuntimeIdentifiers
// MSBuild doesn't handle ';' in parameters well, need to escape the double quote. See https://github.com/dotnet/msbuild/issues/471
arguments += $" /p:RuntimeIdentifiers=\\\"{runtimeIds}\\\"";
arguments += $" /p:ContainerRuntimeIdentifiers=\\\"{runtimeIds}\\\"";
}
}
}
Expand Down