Is your feature request related to a problem? Please describe the problem.
When deploying or running Aspire, every project in Aspire has Environment(e,g, Development, Staging, Production).
When we are on Run Mode, we could specify it in launchsettings.json.
But when we are on PublishMode, we could not specify it.
I'm using workaround for this issue.
if (builder.ExecutionContext.IsPublishMode)
{
var environmentName = builder.AddParameter("hostingEnvironment");
var environmentVariableName = "DOTNET_ENVIRONMENT";
apiService.WithEnvironment(environmentVariableName, environmentName);
webFrontend.WithEnvironment(environmentVariableName, environmentName);
}
But this workaround does not works for builder.Environment of AppHost itself.
Even if we are deploying for "Production" environment, builder.Environment is "Development". It is confusing.
Describe the solution you'd like
Abillity to select launchSettings.json for each publish profile.
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
When deploying or running Aspire, every project in Aspire has Environment(e,g, Development, Staging, Production).
When we are on Run Mode, we could specify it in launchsettings.json.
But when we are on PublishMode, we could not specify it.
I'm using workaround for this issue.
But this workaround does not works for
builder.Environment
of AppHost itself. Even if we are deploying for "Production" environment,builder.Environment
is "Development". It is confusing.Describe the solution you'd like
Abillity to select launchSettings.json for each publish profile.
Additional context
No response