Synetec.FeatureManagement 1.0.2

dotnet add package Synetec.FeatureManagement --version 1.0.2
                    
NuGet\Install-Package Synetec.FeatureManagement -Version 1.0.2
                    
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="Synetec.FeatureManagement" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Synetec.FeatureManagement" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Synetec.FeatureManagement" />
                    
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 Synetec.FeatureManagement --version 1.0.2
                    
#r "nuget: Synetec.FeatureManagement, 1.0.2"
                    
#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 Synetec.FeatureManagement@1.0.2
                    
#: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=Synetec.FeatureManagement&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Synetec.FeatureManagement&version=1.0.2
                    
Install as a Cake Tool

Synetec.FeatureManagement

This is a wrapper for the Microsoft.FeatureManagement library that adds additional functionality and provides an endpoint for a frontend application to retrieve feature flags.

It will also provide a way to manage feature flags in a database instead of in configuration files.

Installation

You can install the Synetec.FeatureManagement package via NuGet Package Manager Console:

Install-Package Synetec.FeatureManagement

Usage

To use the Synetec.FeatureManagement package, follow these steps:

  1. Register the feature management services in your Startup.cs or Program.cs file:
// See full list of configuration options in Synetec.FeatureManagementOptions class
services.AddSynetecFeatureManagement(o => {
	o.AdminRole = "Admin";
	});
  1. Use the feature management services in your application:
public class MyService
{
	private readonly IFeatureManager _featureManager;
	public MyService(IFeatureManager featureManager)
	{
		_featureManager = featureManager;
	}
	public async Task DoSomethingAsync()
	{
		if (await _featureManager.IsEnabledAsync("MyFeature"))
		{
			// Feature is enabled, do something
		}
		else
		{
			// Feature is disabled, do something else
		}
	}
}
  1. Access the feature flags endpoint:

You can access the feature flags endpoint at /config to retrieve the current feature flags and their statuses. This endpoint is secured with the 'ReaderRole' defined in the configuration options.

It will return a JSON object with the feature flags and their statuses for the requesting user, so it will take account of specific flags for the user or their roles.

{
  "MyFeature": true,
  "AnotherFeature": false
}

Creating feature filters

The recommended approach is to add the feature to appsettings.json in the off state. For local development, you can then enable the feature in appsettings.Development.json or via the database.

On Azure, you can use App Configuration to manage your feature flags.

Two additional metadata properties are supported for each feature flag:

  • Clients: a string array of client app names to allow filtering of the features reported to that site.
  • AddedOn: used to keep track of how long a feature has been active in the code base - to help with managing removal of features.

Example appsettings.json entry:

{
  "FeatureManagement": {
	"MyFeature": {
	  "EnabledFor": [ ],
	  "Clients": [ "WebApp", "MobileApp" ],
	  "AddedOn": "2025-11-15"
	}
  }
}

EnabledFor can be left empty if you just want to enable/disable the feature globally.

Features can be enabled as 'always on', for a specific user or group (which is the role the user has in the system) , or as a percentage rollout. Note: groups must have a Name and a RolloutPercentage.

{
  "FeatureManagement": {
    "NewHomePage": {
      "EnabledFor": [
        {
          "Name": "Microsoft.Targeting",
          "Parameters": {
            "Audience": {
              "Users": [],
              "Groups": [
                {
                  "Name": "User",
                  "RolloutPercentage": 100
                }
              ]
            }
          }
        }
      ], //
      "Clients": [ "UserManagerApp" ],
      "AddedOn": "2025-11-19"
    },
    "BetaUserProfile": {
      "EnabledFor": [
        { "Name": "AlwaysOn" }
      ],
      "Clients": [ "UserManagerApp" ],
      "AddedOn": "2025-11-19"
  }
}

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 595 11/27/2025
1.0.1 283 11/23/2025
1.0.0 356 11/21/2025

Adds key vault support to AppConfiguration