FeatBit

Exploring .NET Aspire: My First Experience

I had a great experience working on my first project with .NET Aspire. Here's what impressed me:

  1. Integrating .NET Aspire into my existing solution was straightforward. The orchestration configuration code is clean, intuitive, and easy to follow.
  2. Managing dependencies and launch order between different services was a breeze. Aspire handled the coordination of dependencies seamlessly.
// This configuration code in .NET Asipre project
// demonstrates clearly what point 1 and 2 are talking about
 
var builder = DistributedApplication.CreateBuilder(args);
var cache = builder.AddRedis("cache");
var apiService = builder
    .AddProject<Projects.MyProject_ApiService>("apiservice");
 
builder.AddProject<Projects.MyProject_BlazorApp>("webapp")
    .WithExternalHttpEndpoints()
    .WithReference(cache)
    // Wait for redis cache to be ready before starting the web api
    .WaitFor(cache) 
    .WithReference(apiService)
    .WaitFor(apiService);
  1. I could launch the entire project with a single click in Visual Studio, and then debug all the services running through Aspire.
  2. The structured logs and OpenTelemetry integration made it easy to pinpoint errors and access detailed exception information in the logs.

I will use .NET Aspire firstly for debugging purposes, and then I will try to use it to deploy it in Azure. I am very excited about the future of .NET Aspire.

Ready to use feature flags to expedite your dev and deployment process?