dotnet / aspire

An opinionated, cloud ready stack for building observable, production ready, distributed applications in .NET
https://learn.microsoft.com/dotnet/aspire
MIT License
3.68k stars 420 forks source link

Unify implementations for `GetLaunchSettings` between `Aspire.Hosting`, and `Aspire.Hosting.Testing` #5231

Open radical opened 1 month ago

radical commented 1 month ago

The core logic is the same but duplicated in these two methods:

https://github.com/dotnet/aspire/blob/357a0b2e35b9188ba7c4437be3287b9b86388176/src/Aspire.Hosting.Testing/DistributedApplicationFactory.cs#L194-L218 https://github.com/dotnet/aspire/blob/357a0b2e35b9188ba7c4437be3287b9b86388176/src/Aspire.Hosting/LaunchProfileExtensions.cs#L55-L95

context: https://github.com/dotnet/aspire/pull/5218#issuecomment-2274444437

davidfowl commented 2 weeks ago

Any reason we're not doing source sharing? We may also want to expose this to other integrations. Azure functions needs this logic as well.