I am following this blog https://devblogs.microsoft.com/dotnet/introducing-project-tye/
Around step 4 we add Microsoft.Tye.Extensions.Configuration to frontend project This is supposed to enable the following configuration lookup
public void ConfigureServices(IServiceCollection services)
{
services.AddRazorPages();
/** Add the following to wire the client to the backend **/
services.AddHttpClient<WeatherClient>(client =>
{
client.BaseAddress = Configuration.GetServiceUri("backend");
});
/** End added code **/
}
This is .net 3.1 or .net 5 style, I am targeting only .net6.0, that is not a big deal, I add the required service as so
builder.Services.AddRazorPages();
builder.Services.AddHttpClient<WeatherClient>(client =>
{
client.BaseAddress = Configuration.GetServiceUri("backend");
});
the frontend.csproj has the proper package reference
<PackageReference Include="Microsoft.Tye.Extensions.Configuration" Version="0.10.0-alpha.21420.1" />
Build continues to complain
error CS0234: The type or namespace name 'Tye' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
of course it exists. I have tried adding using statement, but that does not make a difference
Advance thanks to anyone who looks into this Tauqir