BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News .NET Aspire 9.0 RC1: Simplified Setup, Azure Functions Support Added, and Other Improvements

.NET Aspire 9.0 RC1: Simplified Setup, Azure Functions Support Added, and Other Improvements

.NET Aspire has released version 9.0 Release Candidate 1 (RC1), a major update to the platform. This version supports both .NET 8 Long Term Support (LTS) and .NET 9 Standard Term Support (STS), incorporating many features and fixes requested by developers across the different components.

This release's significant improvement is simplifying the development environment setup. Developers no longer need a separate .NET workload to build .NET Aspire applications. By adding the Aspire.AppHost.Sdk MSBuild SDK to a project, all necessary components are automatically downloaded via NuGet.

Furthermore, project templates have also been updated. Previously part of the SDK workload, these templates are now available in separate NuGet packages. Developers can install templates for new .NET Aspire projects using the dotnet new install command, making project setup more straightforward.

The .NET Aspire dashboard received updates. Users can now manage the lifecycle of orchestrated named resources, a highly requested feature. This allows them to stop, start, and restart resources directly from the dashboard, providing greater control over application components.

Resource details are now better displayed, and sensitive properties, volumes, and health checks are more accessible. The dashboard offers improved mobile and responsive support, enhancing usability across different devices. Additionally, the console log now supports colorful output with multiple ANSI escape codes, allowing text formatting with various colors and styles like bold, underline, and italics.

Telemetry services have been expanded. Developers can filter traces using attribute values, such as filtering HTTP requests by the http.route attribute to view traces for a specific endpoint. The telemetry filtering feature includes autocomplete for existing values, simplifying selection and reducing input errors.

For resources with multiple replicas, telemetry data can now be combined to view information from all instances simultaneously. By selecting the parent resource labeled as the application, developers gain a consolidated view of performance metrics. The dashboard now supports the OpenTelemetry Protocol (OTLP) over HTTP and Cross-Origin Resource Sharing (CORS), enabling OpenTelemetry data from browser applications to be sent to the .NET Aspire dashboard.


(Combine telemetry from multiple resources, Source: .NET Documentation)

Regarding the Orchestration component, the app host has received several enhancements. Developers can specify that a resource should wait for another resource before starting, helping prevent connection errors by ensuring dependencies are ready. Furthermore, persistent containers are now supported, allowing containers to continue running even after the app host has stopped. These containers remain active until manually stopped.

Custom resource commands can now be added to resources within the app host. With a note, this feature is available when running the dashboard locally but is not supported in Azure Container Apps. As reported, this provides developers with the flexibility to execute specific actions on resources as needed.

Integration capabilities have been extended. A new extension method supports starting Redis Insight on a Redis resource, enhancing database management options. An OpenAI integration is available in preview, allowing the use of the latest official OpenAI .NET library directly within .NET Aspire applications.

Furthermore, for MongoDB users, support has been added to specify usernames and passwords when using the AddMongoDB extension method. As explained, if credentials are not specified, random ones are generated but can be manually set.

Addressing a highly requested feature from the community. the preview support for Azure Functions has been introduced, This addition enables developers to create and deploy webhooks and other serverless functions using .NET Aspire, expanding the platform's capabilities in cloud-based application development.

Lastly, the official release notes hold more information about this release for interested readers.

About the Author

Rate this Article

Adoption
Style

BT