What is .NET Aspire? Why do you NEED it in every .NET app? How to get started in minutes!

Published 2024-04-18
.NET Aspire is an opinionated, cloud ready stack for building observable, production ready, distributed applications, and it is AWESOME! You may have seen a lot of demos about what .NET Aspire is and how to get started with the amazing templates, but let's look at how to add .NET Aspire to an existing .NET API back-end, Blazor front-end, and then add in Redis Cache, Garnet, Open Telemetry, and Postgres!

Links:
Docs: learn.microsoft.com/dotnet/aspire/
Tutorial: learn.microsoft.com/dotnet/aspire/get-started/add-…
Garnet: github.com/microsoft/garnet
Videos:    • .NET Aspire  

Chapters:
00:00 - Intro & project walkthrough
02:15 - Add .NET Aspire Orchestration to .NET API
05:25 - Exploring Dashboard and Telemetry
06:58 - Add .NET Aspire to Blazor app and enable Service Discovery
12:45 - Adding Redis Cache to .NET Aspire
16:00 - Adding PostgresSQL and PgAdmin
18:30 - Adding Garnet to existing Redis Client
20:30 - Wrap-up

Join this channel to get access to perks:
youtube.com/channel/UCENTmbKaTphpWV2R2evVz2A/join

👕 Buy some swag! - jamesmontemagno.myspreadshop....
☕️ Buy me a coffee - www.buymeacoffee.com/jamesmontemagno

Follow:
👨‍💻 GitHub: github.com/jamesmontemagno
🦜 Twitter: twitter.com/jamesmontemagno
📄 Website: www.montemagno.com/
📰 Newsletter: newsletter.montemagno.com/

Disclaimer: This channel, videos, and streams are created in my spare time and are a product of me... James Montemagno! They are NOT officially affiliated or endorsed by Microsoft (my employer) in any way. Opinions and views are my own.

What is on my hat? It is the CLE clothing logo because I am from Cleveland! Checkout their awesome CLE merch: cleclothingco.myshopify.com/

What is that art on my wall? It is an original piece from the French street artist Gregos of La Butte Montmartre: www.instagram.com/p/BceZ1oNHiQx/

My Setup:
📷 Canon M50 Mark II - amzn.to/3P8R7lp
💡 Nanoleaf Elements Lights - amzn.to/3umwJVW
🎙 Blue Spark Microphone - amzn.to/3qgtYkq
🎙 Blue Pop Filter - amzn.to/3jEWM3r
🤳 Rode Microphone Arm - amzn.to/2Z68AlE
🎧 Sony MDR7306 Headphones - amzn.to/372jxta
📲 Stream Deck - amzn.to/373Uk1n
🖱 MX Master 2S Mouse - amzn.to/3d7J2gj
⌨️ Tecware Phantom Keyboard - amzn.to/3aUP4y9

Using links I provide I may receive a commission if you buy something which helps support the channel.

#dotnet #dotnetaspire #aspire #visualstudio #blazor #aspnetcore

All Comments (21)
  • @Mr767267
    This is crazy simple. Thanks for this video, as always a fantastic tutorial.
  • @benjsoft
    Thanks James, your demo makes .NET Aspire interesting and easy to understand :D
  • @benjsoft
    Hope next time you can demo how to add .NET MAUI application in .NET Aspire
  • @danielbub
    Great video! Can you make a video on how to deploy it? Afaik, the aspire projet reference the hardcoded .csproj file
  • @LosWochos76
    That looks awesome. I would like to see more, eg using a reverse proxy like Nginx, configuring SSL with letsencrypt and deploying all that to a virtual maschine.
  • @appomobi
    Awesome tech, awesome presentation with that zooming and nice tempo!  How easily can we then deploy this to a self-hosted linux server?
  • @paragraut3504
    Hey James, nice work. Would be great if you show the deployment process using .Net Aspire.
  • @saroshwadia
    Can we use .Net Aspire with a Azure Static Web App with Blazor WASM (Client) and Azure Functions (Api) - Will it replace GIT hub Actions?
  • @manusidler
    Great tutorial, thank you! How would you handle a scenario where Aspire is used for local development only? Do you still integrate the Aspire NuGet packages into your projects (eg. Aspire.Npgsql for Postgres)?
  • @grant_vine
    Please look at an example with DAPR or any service that fails to start without a referenced service running yet (I.e. the database isn’t yet up). Or even just explain some mitigations for this scenario? Otherwise short and simple and informative video thanks
  • @sacalbal
    Great video. A question : In your example, does this mean you can use a postgre database from your backend after having configured .net aspire ? Then, how to use it from your backend ?
  • @jportugal100
    How do you publish to use a custom azure vnet?!
  • @dlandi
    It's all very cool. But the missing piece is the deployment to the Cloud Platform, which was the last sentence in your presentation. I realize it is a preview, but frankly, it will remain a preview until that part is demonstrable. I am looking forward to your future video covering that.