AspNetCore.Docs icon indicating copy to clipboard operation
AspNetCore.Docs copied to clipboard

Blazor WASM options configuration coverage

Open dougclutter opened this issue 3 years ago • 5 comments

Based on the documentation, I can bind an options object using code like this: builder.Services.Configure<PositionOptions>( builder.Configuration.GetSection(PositionOptions.Position));

Unfortunately, this doesn't work unless we include the Microsoft.Extensions.Options.ConfigurationExtensions package. It would be great if the documentation mentioned this.

Thanks!


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

dougclutter avatar Jul 15 '22 10:07 dougclutter

I just tested and it works fine without it.

Rick-Anderson avatar Jul 15 '22 21:07 Rick-Anderson

Hi Rick - could you please test it while creating a Blazor Wasm application? That's where I ran into the problem.

dougclutter avatar Jul 16 '22 18:07 dougclutter

@dougclutter ... ~Look at the Blazor version of the doc. I placed examples for everything that WASM can do with ASP.NET Core config, including mini-examples. I also think that all of the required package mentions are there. If you find a scenario that's missing a package mention, please open a new issue from the bottom of that topic (This page feedback button+form).~

https://docs.microsoft.com/aspnet/core/blazor/fundamentals/configuration

guardrex avatar Jul 20 '22 17:07 guardrex

No, let's go ahead and repurpose this issue. I'll change the metadata and update the title. I should make a pass on Options config and expand the doc at least a little to call out either that everything works as expected from the main doc or scope the scenarios that do work. I'll add the namespace either way.

Note that we're crazy busy 🏃😅 for the upcoming .NET 7 release, so I expect that it will take quite a while to reach this. I'll probably get back to it very late this year or 23Q1.

guardrex avatar Jul 20 '22 17:07 guardrex

@guardrex - I understand crazy busy Luke; thanks for looking into it.

dougclutter avatar Jul 24 '22 13:07 dougclutter