Azure-docs: Non-existent extension method

Created on 11 Aug 2020  Â·  6Comments  Â·  Source: MicrosoftDocs/azure-docs

The second code example is using the extension method
C# services.AddFeatureManagement(options => { options.UseConfiguration(Configuration.GetSection("MyFeatureFlags")); });

But with a training, I do not found the method _AddFeatureManagement_. Neither in the api documentation https://docs.microsoft.com/en-us/dotnet/api/microsoft.featuremanagement.servicecollectionextensions.addfeaturemanagement?view=azure-dotnet-preview#Microsoft_FeatureManagement_ServiceCollectionExtensions_AddFeatureManagement_Microsoft_Extensions_DependencyInjection_IServiceCollection_Microsoft_Extensions_Configuration_IConfiguration_

Does this method is still existing ?


Document Details

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

Pri2 assigned-to-author azure-app-configuratiosvc doc-bug triaged

All 6 comments

@worming004 Thanks for the question! We're investigating this and will get back to you shortly.

@worming004 - My understanding is that you are not able to consume the method services.AddFeatureManagement

I had installed the Microsoft.FeatureManagement Nuget Package
Project ->Manage Nuget Packages -> Browse -> Microsoft.FeatureManagement

Also, I had added the reference to the same.

image

With the above steps, I was able to make use of the method.

image

Wanted a quick understanding whether you followed the above steps and encountered the issue. Also, please feel free to let me know if I had missed anything or you are doing differently at your end.

Hello @Svijay-msft ,

You are near of the issue I encounter. services.AddFeatureManagement(); is working well. And I successfully installed Microsoft.FeatureManagement Nuget package.
But the method with the Action is not found.
image

Maybe I miss another Nuget package ?

@lisaguthrie

One of the overload of AddFeatureManagement method is expecting IConfiguration object.

image

Reference : AddFeatureManagement(IServiceCollection, IConfiguration)

In the example in the documentation to read from a different section we are not passing IConfiguration object. We are passing an Action.

services.AddFeatureManagement(options =>
{
options.UseConfiguration(Configuration.GetSection("MyFeatureFlags"));
});

@worming004 I have assigned the issue to the content author to review further and update the document as appropriate.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JamesDLD picture JamesDLD  Â·  3Comments

mrdfuse picture mrdfuse  Â·  3Comments

jamesgallagher-ie picture jamesgallagher-ie  Â·  3Comments

Ponant picture Ponant  Â·  3Comments

JeffLoo-ong picture JeffLoo-ong  Â·  3Comments