-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Is your feature request related to a problem? Please describe.
It would be helpful if you could get container build information from for one project from another project:
For CLI based apps, you can get this information out via -getproperty
and -getitem
but there's no way to do this within a larger msbuild project.
Describe the solution you'd like
A target that can output the following information in a way that can be read in another project
- Whether the project is enabled for SDK container builds
- Container Registry
- Container Repository
- Container Tags
- Container Ports (including derivations from
ASPNETCORE_URLS
,ASPNETCORE_HTTP_PORTS
&ASPNETCORE_HTTPS_PORTS
Additional context
For context of what I'm looking for - I'm trying to capture container metadata from an application in a library that can reference that project's container as a custom Aspire Hosting Integration, using a similar pattern to Aspire's IProjectMetadata
implementation:
https://github.com/afscrome/AspireProjectAsContainerNugetIntegration/blob/eea83ae7270d5f55425a4a448c4d7d0570e09363/SdkContainerPackage.Aspire.Hosting.ApiService/sdk/Sdk.targets#L38-L49
https://github.com/afscrome/AspireProjectAsContainerNugetIntegration/blob/eea83ae7270d5f55425a4a448c4d7d0570e09363/Directory.Build.targets#L3-L12