dotnet / aspire

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

AppHost Integration #3968

Open djonser opened 2 weeks ago

djonser commented 2 weeks ago

I drafted a PR (work in progress) where one part consists of extracting metadata from AppHost referenced projects and generating source files similar to IProjectMetadata. Now I'm at a place where I'm wondering how something like this should be integrated. What projects should own what responsibilities and what projects should exist for the purpose of this.

This particular use-case would only be interesting for those that want to express AWS Lambda Functions in their application model.

ASPIRE004

AWS Lambda supports class libraries which required some changes to Aspire.Hosting.AppHost.targets so that the user do not have to configure SkipValidateAspireHostProjectResources=true. This change splits evaluation of referenced projects and creation of warnings so that its possible for a different target to run between and set IsAspireIntegratedClassLibrary=true.

This affects _AspireProjectResource which now also has IsExecutableReference=true/false and potentially IsAspireIntegratedClassLibrary=true.

Would this change (or alternative implementation) that enables project-by-project suppression of ASPIRE004 be possible?