Skip to content

Add Dependency Injection Support for openfeature-dotnet-server #48

@arttonoyan

Description

@arttonoyan

Is your feature request related to a problem? Please describe.
Currently, the openfeature-dotnet-server SDK does not provide a built-in package for Dependency Injection (DI) to simplify integration with .NET Core applications. While the core OpenFeature .NET SDK supports DI, LaunchDarkly-specific extensions do not yet expose a similar developer experience.
In my company, we use LaunchDarkly extensively (it’s a fantastic product), and I’ve developed an internal integration package to bridge this gap and help teams onboard quickly.

Describe the solution you'd like
I’d like to see official support for a DI-friendly package for openfeature-dotnet-server, similar to how OpenFeature itself exposes a clean, idiomatic .NET integration.
My current usage looks like this:

builder.Services.AddOpenFeature(featureBuilder =>
{
    featureBuilder
        .AddHostedFeatureLifecycle()
        .AddContext(/* context config */)
        .AddLaunchDarkly(builder.Configuration["LaunchDarkly:SdkKey"]);
});

This approach allows seamless integration of OpenFeature with LaunchDarkly in ASP.NET Core apps, following best practices around IServiceCollection.

Describe alternatives you've considered
I’ve created an internal NuGet package to add DI support for LaunchDarkly with OpenFeature, but I believe this would be more valuable as an officially supported extension. Alternatively, developers have to manually configure ILaunchDarklyClient and bind it into OpenFeature manually, which adds friction.

Additional context
I’d be happy to contribute my internal implementation as a starting point if the maintainers are open to the idea. I believe this would significantly lower the entry barrier for adopting OpenFeature with LaunchDarkly in .NET environments and could be improved step-by-step with community feedback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions