Aspire.Hosting.Azure.ContainerRegistry 13.6.1

Prefix Reserved
dotnet add package Aspire.Hosting.Azure.ContainerRegistry --version 13.6.1
                    
NuGet\Install-Package Aspire.Hosting.Azure.ContainerRegistry -Version 13.6.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.

                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.

                    
Directory.Packages.props

                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Aspire.Hosting.Azure.ContainerRegistry --version 13.6.1
                    
#r "nuget: Aspire.Hosting.Azure.ContainerRegistry, 13.6.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Aspire.Hosting.Azure.ContainerRegistry@13.6.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Aspire.Hosting.Azure.ContainerRegistry&version=13.6.1
                    
Install as a Cake Addin
#tool nuget:?package=Aspire.Hosting.Azure.ContainerRegistry&version=13.6.1
                    
Install as a Cake Tool

Azure Container Registry hosting integration

Use this integration to model, configure, and orchestrate an Azure Container Registry for container images in an Aspire solution.

Getting started

Prerequisites

  • An Aspire AppHost and a running container runtime, such as Docker, for building and pushing container images.
  • For deployment, an Azure subscription with permission to create resources and assign roles, and the Azure CLI authenticated with az login.

Add the integration

From your AppHost directory, add the Aspire.Hosting.Azure.ContainerRegistry integration with the Aspire CLI:

aspire add Aspire.Hosting.Azure.ContainerRegistry

The example also uses the Azure Container Apps deployment target:

aspire add Aspire.Hosting.Azure.AppContainers

Usage example

Then, in the AppHost, add a registry and attach it to an Azure Container Apps environment. The example uses the core AddDockerfile API and assumes a worker subdirectory of the AppHost directory contains a Dockerfile for a background application.

C#

using Aspire.Hosting;

var builder = DistributedApplication.CreateBuilder(args);

var registry = builder.AddAzureContainerRegistry("registry");

builder.AddAzureContainerAppEnvironment("env")
    .WithAzureContainerRegistry(registry);

builder.AddDockerfile("worker", "worker");

builder.Build().Run();

TypeScript

import { createBuilder } from './.aspire/modules/aspire.mjs';

const builder = await createBuilder();

const registry = await builder.addAzureContainerRegistry("registry");
const environment = await builder.addAzureContainerAppEnvironment("env");
await environment.withAzureContainerRegistry(registry);

await builder.addDockerfile("worker", "worker");

await builder.build().run();

WithAzureContainerRegistry selects the registry used by the environment's deployment pipeline and managed-identity image pulls; it is not a runtime connection reference. Without an explicit registry, the Container Apps environment creates a default registry.

The registry is deployment infrastructure and is not provisioned during local runs. aspire publish generates its Bicep; aspire deploy provisions it and pushes the application's images as part of deployment. See the Container Apps deployment guide for Azure settings, deployment, and cleanup.

Additional documentation

Feedback & contributing

https://github.com/microsoft/aspire

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on Aspire.Hosting.Azure.ContainerRegistry:

Package Downloads
Aspire.Hosting.Azure.AppContainers

Azure container apps resource types for Aspire.

Aspire.Hosting.Azure.AppService

Azure app service resource types for Aspire.

Aspire.Hosting.Foundry

Microsoft Foundry resource types for Aspire.

Aspire.Hosting.Azure.Kubernetes

Azure Kubernetes Service (AKS) resource types for Aspire.

Aspire.Hosting.Azure.Provisioning.ContainerRegistry

Opt-in Azure Provisioning Container Registry APIs for polyglot Aspire AppHosts.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
13.6.1 0 10/7/2026
13.6.0 16,082 9/29/2026
13.5.4 38,834 9/15/2026
13.5.3 93,771 8/25/2026
13.5.2 29,916 8/21/2026
13.5.1 4,979 8/20/2026
13.5.0 18,844 8/18/2026
13.4.6 273,115 6/19/2026
13.4.5 18,178 6/17/2026
13.4.4 17,641 6/15/2026
13.4.3 33,083 6/8/2026
13.4.2 27,269 6/3/2026
13.4.1 550 6/3/2026
13.4.0 8,764 6/1/2026
13.3.5 37,951 5/21/2026
13.3.4 7,579 5/19/2026
13.3.3 13,115 5/15/2026
13.3.2 10,063 5/14/2026
13.3.1 5,072 5/12/2026
13.3.0 34,150 5/7/2026
Loading failed