var http = new HttpClient()
{
BaseAddress = new Uri(builder.HostEnvironment.BaseAddress),
};
builder.Services.AddScoped(sp => http);
using var response = await http.GetAsync("appsettings.json");
using var stream = await response.Content.ReadAsStreamAsync();
builder.Configuration.AddJsonStream(stream);
This is in my program.cs to get the url for the api project.
I can run this fine in Visual Studio but not i RBS.