News

Cloud-Native .NET Aspire 8.1 Targets Building Containers, Orchestrating Python

Microsoft's first significant update to .NET Aspire addresses the building of container images and the orchestration of Python code among a bevy of new features and enhancements.

.NET Aspire is for cloud-native app development, providing a framework for building, testing and deploying distributed apps that typically leverage cloud constructs like microservices, containers, serverless architecture and so on. The new 8.1 release, announced on Tuesday, is the first significant update to the platform since it became generally available in May, though preview bits were already baked into .NET 8.

Since then, Microsoft has been making a big push to publicize the new offering, indicating its importance to the company.

The framework itself could be called distributed, as it comes in a collection of NuGet packages that can be used to build apps in Visual Studio, Visual Studio Code or the command line.

.NET Aspire
[Click on image for larger view.] .NET Aspire (source: Microsoft).

"This release includes several new features and quality of life improvements based on feedback from developers using .NET Aspire in production applications," said Microsoft's Mitch Denny in a July 23 announcement of .NET Aspire 8.1.

He highlighted two specific features of the update: support for building container images with the AddDockerfile(...) method and orchestrating Python code with AddPythonProject(...) method.

Container Images
Working with the AddDockerfile(...) method that automatically builds a Docker file when the App Host runs, the WithDockerfile(...) method also helps developers automate Dockerfile building and customization by allowing for easy editing and integration with existing resources. So the former is ideal for creating new container resources, while the latter is used for modifying existing container images.

Both methods support build arguments and secrets, enabling developers to pass parameters and sensitive information securely to the Docker build process while avoiding accidental disclosure in the application manifest.

"This means that you can quickly edit your Dockerfiles and rely on .NET Aspire to build them without having to manually build them yourself," Denny said.

Orchestrating Python Code
This second major feature highlighted by Denny enhances support for polyglot microservice architectures via the code orchestration AddPythonProject(...) method. In .NET Aspire, orchestration primarily focuses on enhancing the local development experience by simplifying the management of a cloud-native app's configuration and interconnections.

The method, contributed by Willem Meints, allows developers to launch Python-based services. To use it, devs need to install the Python hosting package and add a Python resource to their application model. The method leverages Python's virtual environment (venv) tool and requires manual installation of dependencies specified in the requirements.txt file. Additionally, if the opentelemetry-distro[otlp] dependency is included, it enables telemetry in the .NET Aspire dashboard. However, due to a limitation with OpenTelemetry libraries, the application must be run with the ASPIRE_ALLOW_UNSECURED_TRANSPORT environment variable set to true.

The Python support joins existing support for Node.js apps.

More Updates
Denny's post also provides details about:

  • New resource types and components coming in containerized extensions ranging from Kafka UI to Azure Web PubSub
  • Testing improvements (easier to write test cases that need to wait for resources to initialize)
  • Metrics exemplars (example data points for aggregated data)
  • Span links (create relationships between spans)
  • Improved instance ID names (friendly instance IDs instead of hard-to-read GUIDs)

More information can be found in Microsoft's What's new in .NET Aspire documentation.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Microsoft Highlights Visual Studio Live! Event Lineup and Longtime Developer Community Role

    A Microsoft MVP Blog post on Visual Studio Live!'s longevity arrives as the 2026 conference series continues with upcoming stops at Microsoft HQ, San Diego and Orlando.

  • Using Local AI to Cut Copilot Usage-Based Billing Shock

    After being gobsmacked by the new billing plan using almost all my monthly credits in one or two days, I tried pushing some Copilot-style coding work onto local models in VS Code. What I found was less "free AI" and more "pick your pain": cloud charges on one side, heavy local resource use and long waits on the other.

  • .NET 11 Preview 5 Focuses on Performance, Productivity and Safer Code

    .NET 11 Preview 5 focuses on under-the-hood runtime performance gains, streamlined APIs and language features that reduce boilerplate, plus built‑in security checks and incremental ASP.NET Core and EF Core improvements aimed at everyday developer productivity.

  • VS Code 1.124 Focuses on Agent Autonomy and Parallel Sessions

    Microsoft's June 2026 VS Code update turns on Autopilot by default and adds background sending for agent sessions.

Subscribe on YouTube