.Net Aspire

December 19, 2023    Development .Net

.Net Aspire Overview

Nick Chaspas said that .Net Aspire was “The most exciting announcement at .Net Conf”, “Amazing Tech” [1].

What is it?

In the first 8 minutes of .Net Conf 2023 - Building Cloud Native apps with .NET 8 - Glenn Condon and David Fowler Glenn shared the journey to creating .Net Aspire and what was created to help with. It was created to be “Developer first, productivity and integrating as naturally as possible”.

He mentions several things:

  • Getting going is complicated with all the choices.
  • Nothing seems to work together by default.
  • Built from learnings from Microsoft teams and Project Tye
  • Logging, Configuration, Resilience, where to host, etc

.Net Aspire

Demo

In the same video [0], David Fowler demos a project using .Net Aspire. Nick Chaspas also walks through it in What Is .NET Aspire? The Insane Future of .NET! .

There is a new starter template in Visual Studio Preview. It’s a great place to start to play with it.

  • “You will need the latest .NET 8 and Visual Studio 2022 Preview (17.9 Preview 1).” [1]
  • update install with .Net Aspire feature selected
  • New project - .Net Aspire Starter Template

be sure to notice the configuration, in .csproj, dashboard and logging (OTLP standard), Add New Project and AddRedisCache with Aspire Nuget packages (curated packages that have all the pieces you need).

Deployment

Aspire generates a json manifest that other tools can use to deploy to hosting of your choice. It does not do any deployment on it’s own

There is a video using azd in the blog post [1].

“The Azure Developer CLI can also create bicep from the manifest to allow developers and platform engineers to audit or augment the deployment processes.” [1]

How to Deploy .NET 8’s New .NET Aspire Stack - Nick Chapsas

dotnet run --publisher manifest --output-path manifest.json winget install azd azd init azd up

Use with Existing Projects?

Yes you can! right click on projects and add the Aspire Orchestration support or add settings manual

dotnet workload update, dotnet workload install aspire, dotnet new aspire [1]

Summary

.Net Aspire is still in preview, but with Glenn, David and the team innovating on quickly, I think this will soon be the way to build apps that have multiple pieces. The OTLP logging and .Net 8 instrumentation will be very helpful in diagnosing bugs and performance issues. I look forward to using this in my next new project and my even start to add it into existing ones.

.Net Conf 2023 had a lot of great news and I’m still catching up on them. I plan on sharing notes from the videos I watched soon. For now, here’s the .Net Conf 2023 playlist [.Net keeps getting better], and .Net 8 is definitely better . I’ll be updating as soon as I can get the task into our sprint through planning.

.Net Aspire Preview 2 was released on December 21, 2023



Watch the Story for Good News
I gladly accept BTC Lightning Network tips at [email protected]

Please consider using Brave and adding me to your BAT payment ledger. Then you won't have to see ads! (when I get to $100 in Google Ads for a payout, I pledge to turn off ads)

Use Brave

Also check out my Resources Page for referrals that would help me.


Swan logo
Use Swan Bitcoin to onramp with low fees and automatic daily cost averaging and get $10 in BTC when you sign up.