I am currently in the process of introducing aspire in a larger project. There are several worker services that uses the Microsoft.NET.Sdk.Worker sdk and are hosted in Docker containers using the mcr.microsoft.com/dotnet/runtime:8.0-alpine image. It seems that when such a worker service takes a dependency on the *.Aspire.ServiceDefaults project then that image is not enough anymore as the *.Aspire.ServiceDefaults project has a reference to OpenTelemetry.Instrumentation.AspNetCore which in turn has a framework reference to Microsoft.AspNetCore.App.
What is best path here? Should I simply ignore this and use mcr.microsoft.com/dotnet/aspnet:8.0-alpine as the docker base image for all (also non-web) services, or is it a bug that that the *.Aspire.ServiceDefaults project requires the web sdk? Another option would of cause be to split *.Aspire.ServiceDefaults into two projects, a web and non-web.
Could someone add a comment on whether the ServiceDefaults project and hence all projects depending on it is expected to require the full aspnet runtime, or whether this is a bug?
I am currently in the process of introducing aspire in a larger project. There are several worker services that uses the
Microsoft.NET.Sdk.Worker
sdk and are hosted in Docker containers using themcr.microsoft.com/dotnet/runtime:8.0-alpine
image. It seems that when such a worker service takes a dependency on the*.Aspire.ServiceDefaults
project then that image is not enough anymore as the*.Aspire.ServiceDefaults
project has a reference toOpenTelemetry.Instrumentation.AspNetCore
which in turn has a framework reference toMicrosoft.AspNetCore.App
.What is best path here? Should I simply ignore this and use
mcr.microsoft.com/dotnet/aspnet:8.0-alpine
as the docker base image for all (also non-web) services, or is it a bug that that the*.Aspire.ServiceDefaults
project requires the web sdk? Another option would of cause be to split*.Aspire.ServiceDefaults
into two projects, a web and non-web.