dotnet / aspire

Tools, templates, and packages to accelerate building observable, production-ready apps
https://learn.microsoft.com/dotnet/aspire
MIT License
3.92k stars 479 forks source link

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

Open radical opened 3 months ago

radical commented 3 months 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 months 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.