The recently unveiled .NET Aspire, designed for developing cloud-native applications, perfectly complements Azure Container Apps (ACA). Tailored for managing applications consisting of interdependent microservices, .NET Aspire seamlessly integrates with ACA, which is specifically crafted for microservices and built on cloud-native technology.
Furthermore, the .NET Aspire stack provides a customized deployment experience for ACA through the Azure Developer CLI (AZD). With a single command, you can effortlessly create, provision, and deploy Azure resources for your Aspire solution.
This post delves into the advantages of hosting your applications in ACA compared to an unmanaged cluster. We will also demonstrate the straightforward process of getting started by walking through sample code.
Why Choose Azure Container Apps?
Azure Container Apps (ACA) serves as a platform for running container-first applications and microservices. Powered by Kubernetes, it stands out for its user-friendly approach, making it significantly simpler for the average developer to use and manage. Teams utilizing ACA can concentrate on developing their applications and swiftly moving toward production without the need to delve into the complexities of cluster management from the outset.
Moreover, ACA proves to be an excellent choice for those seeking flexibility and cost efficiency. Operating as a serverless environment, it provides pay-per-use consumption hosting that scales to zero, along with dedicated specialized compute hosting featuring fixed pricing and reliability. With comprehensive support for open-source technologies like Dapr and KEDA, ACA empowers developers to leverage the best practices and tools of the broader microservices ecosystem—all within a unified platform!
These attributes position ACA as an ideal option for developers aiming to construct cloud applications with minimal overhead and complexity. If you're intrigued, keep reading—we'll guide you through some sample code to demonstrate just how swift and uncomplicated it is to deploy a .NET Aspire solution to ACA.
Begin Your Journey with .NET 8, .NET Aspire, and AZD
If you haven't embarked on your .NET Aspire journey alongside .NET 8, navigate to the .NET Aspire documentation. This resource will guide you through all the necessary steps to kickstart your development process, covering the installation of Visual Studio (or Visual Studio Code), .NET 8, the .NET Aspire workload, and Docker Desktop. Alternatively, you have the option to utilize the entire process through the .NET CLI if that's your preference.
Create your .NET Aspire project
If you haven't set up a .NET Aspire project yet, there's no need to worry; the starter project serves as an excellent starting point. In Visual Studio, generate a new .NET Aspire Starter Application, making sure to choose "Use Redis for caching," and you're ready to go.

Alternatively, you can create this directly from the .NET CLI using the following command:
dotnet new aspire-starter --use-redis-cache --output AspireSample
Configure the Azure Developer CLI
The Azure Developer CLI (AZD) stands out as a new open-source tool designed to streamline Azure deployments. AZD goes beyond merely facilitating the creation, provisioning, and deployment of Azure resources for your Aspire solution with a single command—it seamlessly integrates with various .NET tools and is accessible from both Visual Studio Code and Visual Studio.
Note. Visual Studio's publishing team is actively investing in several AZD features, with current support for AZD-based publishing. If you haven't explored AZD yet, now is an opportune moment to leverage its repeatable, composable deployment capabilities. As you'll discover later in this article, the synergy between Aspire and AZD creates an automated way to deploy your .NET Cloud Native apps to ACA without the need for any infrastructure code.
AZD builds upon the foundation of the Azure CLI and Bicep. Similar to how ACA simplifies Kubernetes, AZD simplifies deployment by offering intelligent defaults for Aspire solutions. Additionally, if necessary, you can customize the Bicep templates pulled in by AZD.
Refer to this documentation for the installation steps for AZD.





Join the conversation! Your thoughts help the community grow.