Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News .NET Aspire Preview 4: Database Managament Tools, Podman and More Cloud APIs Support Added

.NET Aspire Preview 4: Database Managament Tools, Podman and More Cloud APIs Support Added

This month, Microsoft revealed the availability of the .NET Aspire - fourth preview. Preview 4 brings improvements across various aspects of its framework, addressing key community requests. Key focus areas include enhancements to Entity Framework components, Podman support, more Cloud APIs support, and application model adjustments for easier resource management.

Preview 4 introduces new APIs and several improvements regarding the databases and Entity Framework. Notable additions include new database management tools for MySQL and MongoDB databases, namely phpMyAdmin and mongo-express, respectively. The release also introduces new methods for configuring Entity Framework, addressing advanced scenarios like different lifetime scopes and custom service types.

Improvements have been made to the Entity Framework migrations process within .NET Aspire apps. Previously, EF Core tooling would encounter errors due to missing database connection strings. In Preview 4, .NET Aspire detects EF Core tooling launches and disables connection string validation, ensuring as reported, successful migration creation.

Podman, a container engine without a daemon, is now supported in .NET Aspire Preview 4, allowing users to develop, manage, and run OCI Containers on Linux systems.

The team states following regarding the Podman support:

It's a great alternative to Docker for Linux users who want to run containers without a daemon.

Docker or Podman will be auto-detected; if both are present, Docker is preferred. Podman can be explicitly enabled/forced via an environment variable DOTNET_ASPIRE_CONTAINER_RUNTIME=podman.

Furthermore, the .NET Aspire dashboard, which has gained positive feedback from the developers community, undergoes enhancements in Preview 4 to improve usability and accessibility. Notably, the dashboard can now operate as a standalone container image, facilitating remote application management. Additionally, a few keyboard navigation shortcuts have been integrated into the dashboard for enhanced user experience.

(.NET Aspire Dashboard user experience updates, Source: Microsoft Documentation)

Regarding the dashboard changes, the official documentation states the following:

The dashboard has been updated with a new look and feel. The new dashboard is designed to reduce the space used by the navigation tabs and to make it easier to navigate between logs, metrics, and traces.

Significant improvements of Azure resources shipped with .NET Aspire are observed in this release, featuring a new bicep resource for modelling various Azure services. These changes are encapsulated in the Aspire.Hosting.Azure NuGet package, which as reported, aims to simplify Azure resource modelling. Also, new components like Azure SignalR, and Azure AI Search are introduced.

Furthermore, the release introduces mappings between containerized services and fully-managed Azure equivalents, enabling development-to-deployment transitions. Services like Redis, Postgres, and SQL Server now have Azure counterparts, with plans to support additional services like MySql, MongoDB, and Kafka in the future.

The following code snippet shows the usage of Redis with the builder object.

var builder = DistributedApplication.CreateBuilder(args);

var redis = builder.AddRedis("redis")



The introduction of a new primitive to model Azure Bicep modules within the application model enhances the framework's flexibility in resource modelling. This enhancement simplifies the representation of Azure resources, enabling using Bicep files as literal strings, embedded resources, or files on disk.

Preview 4 also introduces some changes regarding the Emulator's support, changing the APIs to match with the idioms.

Lastly, the .NET Aspire team has announced their commitment to releasing a new preview version every month, to deliver a stable 8.0 release by the second quarter of 2024. Microsoft indicates that these monthly releases are planned to provide developers with regular updates, integrating fresh features and improvements throughout the development process.

About the Author

Rate this Article