News
.NET Aspire 9.4: CLI Goes GA, Dashboard Gets Interactive
Microsoft has released .NET Aspire 9.4, an update that introduces new integrations, interactive dashboard-based inputs, and a standalone, native AOT (ahead-of-time) command-line interface (CLI) tool for creating and running Aspire applications.
The open-source project, aimed at simplifying the development of cloud-native .NET applications, also has its first roadmap available, detailing features expected in the next six months.
Aspire CLI Is Generally Available
The Aspire CLI is now generally available with version 9.4, designed to streamline the development process. The CLI offers a fast, scriptable, and consistent method for scaffolding, running, and configuring applications. It includes four core commands:
- aspire new: Used to select from templates to start an application.
- aspire add: Facilitates the addition of Aspire hosting integrations within a repository.
- aspire run: Enables running the full application stack from any terminal, editor, or subdirectory.
- aspire config: Allows viewing, setting, and changing CLI settings and feature flags, either locally to a repository or globally on a machine.
The CLI is compiled with native AOT, which enhances its speed across various architectures. Developers can download the GA CLI using an install script:
Bash:
curl -sSL [https://aspire.dev/install.sh](https://aspire.dev/install.sh) | bash
Powershell:
iex "& { $(irm [https://aspire.dev/install.ps1](https://aspire.dev/install.ps1)) }"
For those currently using the Aspire CLI as a dotnet tool, it is not the AOT version. To update to the AOT version, the dotnet tool should first be uninstalled using dotnet tool uninstall -g aspire.cli.
Additional Features and Functionality in Aspire 9.4
- Custom Dashboard Interactivity: Aspire 9.4 enhances dashboard customization with custom resource commands, named URLs, and the ability to integrate with resource lifecycle events. A new extensibility point, the interaction service, allows for creating custom user experiences to gather input during development, present notifications, or request confirmation before executing commands. The interaction service supports five input types: Text, Secret Text, Number, Choice, and Boolean. This service is currently in preview.
[Click on image for larger view.] Dashboard Interaction (source: Visual Studio Magazine).
- Built-in Prompting for Parameters: The new interaction service is leveraged in Aspire 9.4 to collect any missing parameter values defined in an apphost. Instead of requiring developers to maintain local
appsettings.development.json or environment files, Aspire will prompt for missing values in the dashboard before starting resources that require them. Parameter descriptions can be customized with markdown, and values can optionally be saved to user secrets for non-source-controlled, per-project configurations.
- AI Development with GitHub Models and Azure AI Foundry: Aspire 9.4 includes two new AI-focused hosting integrations: GitHub Models (Preview) and Azure AI Foundry (Preview). These integrations allow developers to define AI models in their apphost and run them locally or deploy them for development. Both integrate with the Azure AI Inference (Preview) client integration, providing OpenTelemetry traces and bootstrapping code for client applications.
- Updated YARP Integration: The preview YARP integration has been updated with fluent transform APIs, enabling programmatic definition of configuration in C# with strong types, IntelliSense, and integration with other Aspire resource configurations.
Developers can begin using Aspire 9.4 by updating their AppHost.csproj SDK version and packages to 9.4.0.
About the Author
David Ramel is an editor and writer at Converge 360.