Featureflow 1.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Featureflow --version 1.2.0
                    
NuGet\Install-Package Featureflow -Version 1.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Featureflow" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Featureflow" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Featureflow" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Featureflow --version 1.2.0
                    
#r "nuget: Featureflow, 1.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Featureflow@1.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Featureflow&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Featureflow&version=1.2.0
                    
Install as a Cake Tool

Featureflow .NET SDK

Server-side .NET SDK for Featureflow feature management.

Compatible with .NET Framework 4.5+, and any runtime supporting .NET Standard 1.3 or 2.0 (.NET Core, .NET 5+, Mono, Xamarin).

Installation

dotnet add package Featureflow

or via the Package Manager console:

Install-Package Featureflow

Quick start

You'll need the server environment API key (sdk-srv-env-...) from the environment page of your Featureflow dashboard. It's a secret — keep it out of source control.

Create one client for the lifetime of your application:

using Featureflow.Client;

var client = FeatureflowClientFactory.Create("sdk-srv-env-YOUR_KEY");

Create blocks until the initial feature set has loaded, so evaluations are ready immediately. From an async context:

var client = await FeatureflowClientFactory.CreateAsync("sdk-srv-env-YOUR_KEY");

The client is thread-safe, keeps itself up to date in the background, and implements IDisposable — dispose it on shutdown. Register it as a singleton in your DI container:

builder.Services.AddSingleton<IFeatureflowClient>(
    FeatureflowClientFactory.Create(builder.Configuration["Featureflow:ApiKey"]));

Then evaluate features anywhere:

if (client.Evaluate("my-feature-key", user).IsOn())
{
    // feature code
}

Targeting users

Pass a User so targeting rules can match on who they are:

var user = new User("user-1234");
user.WithAttribute("tier", "gold");
user.WithAttribute("region", "sydney");
var result = client.Evaluate("my-feature-key", user).IsOn();

Attribute values may be a string, any numeric type, a DateTime, or a List<object> of those. When an attribute holds a list, a rule matches if it matches any value in the list.

Attributes are stored in Featureflow so you can build rules against them later. Use WithSessionAttribute instead for values that should be evaluated but not persisted:

user.WithSessionAttribute("dayofweek", 5);

For evaluations with no meaningful user (batch jobs, health checks):

client.Evaluate("my-feature-key", User.Anonymous()).IsOn();

Percentage rollouts hash the user's Id by default; set user.BucketKey if you want rollout buckets keyed by something else (e.g. an account id so a whole organisation gets the same variant).

Beyond on and off

Features can have any number of variants. Test for a specific one, or read the evaluated variant key directly:

if (client.Evaluate("checkout-flow", user).Is("v2"))
{
    // show the v2 checkout
}

string variant = client.Evaluate("checkout-flow", user).Value(); // e.g. "v2"

EvaluateAll(user) returns a Dictionary<string, Evaluate> of every feature, which is handy for passing a full flag set to a front end.

Failover values

If a feature can't be found (typo'd key, network failure before first load), evaluation returns the failover variant"off" by default. You can register features in code with explicit failover variants:

var client = FeatureflowClientFactory.Create("sdk-srv-env-YOUR_KEY", new List<Feature>
{
    new Feature { Key = "checkout-flow", FailoverVariant = "v1" },
});

Configuration

Build a FeatureflowConfig for anything non-default:

var config = new FeatureflowConfigBuilder()
    .WithGetFeaturesMethod(GetFeaturesMethod.Polling) // default: GetFeaturesMethod.Sse (streaming)
    .WithConnectionTimeout(TimeSpan.FromSeconds(10))  // default: 30s
    .Build();

var client = FeatureflowClientFactory.Create("sdk-srv-env-YOUR_KEY", config);
  • GetFeaturesMethod.Sse (default) holds a streaming connection open so rule changes apply in near real time.
  • GetFeaturesMethod.Polling periodically re-fetches the feature set instead — use it where long-lived connections are impractical.
  • .WithOffline(true) makes no network calls at all: every evaluation returns the failover variant. Useful in unit tests and CI.

Naming your application

Optionally tag this workload with an application name so the Featureflow dashboard can attribute SDK usage and flag evaluations to it (Admin → SDKs, and the "Evaluated by" panel on each feature's statistics tab):

var config = new FeatureflowConfigBuilder()
    .WithApplication("checkout-api")
    .Build();

The name is a slug — lowercase letters, numbers, ., _ and -, at most 64 characters. An invalid value is dropped with a warning and no tag is sent. The FEATUREFLOW_APPLICATION environment variable is used when the option is not set in code.

Reacting to changes

The client raises events when feature rules change:

client.FeatureUpdated += (sender, args) => logger.LogInformation("Feature {Key} updated", args.FeatureKey);
client.FeatureDeleted += (sender, args) => logger.LogInformation("Feature {Key} deleted", args.FeatureKey);

More

License

Apache-2.0

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.3 is compatible.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Featureflow:

Package Downloads
FeatureFlagFramework

A C# Library that allows you to quickly pivot between Feature Flag Services such as LaunchDarkly and Featureflow

FeatureFlagFramework.Clients.Featureflow

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.1 82 8/13/2026
1.2.0 84 8/13/2026
1.1.3 82 8/11/2026
1.1.2 85 8/11/2026
1.1.1 3,839 2/12/2019
1.1.0 909 2/11/2019
1.0.2 1,291 2/27/2018
1.0.1 1,511 2/26/2018
1.0.0 1,503 2/26/2018