ConfigCat.Client
9.3.2
dotnet add package ConfigCat.Client --version 9.3.2
NuGet\Install-Package ConfigCat.Client -Version 9.3.2
<PackageReference Include="ConfigCat.Client" Version="9.3.2" />
paket add ConfigCat.Client --version 9.3.2
#r "nuget: ConfigCat.Client, 9.3.2"
// Install ConfigCat.Client as a Cake Addin #addin nuget:?package=ConfigCat.Client&version=9.3.2 // Install ConfigCat.Client as a Cake Tool #tool nuget:?package=ConfigCat.Client&version=9.3.2
ConfigCat SDK for .NET
ConfigCat SDK for .NET provides easy integration for your application to ConfigCat.
About
ConfigCat is a feature flag and configuration management service that lets you separate releases from deployments. You can turn your features ON/OFF using ConfigCat Dashboard even after they are deployed. ConfigCat lets you target specific groups of users based on region, email or any other custom user attribute.
ConfigCat is a hosted feature flag service. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
Supported runtimes
- .NET 5+
- .NET Framework 4.5+
- Other runtimes which implement .NET Standard 2.0+ like .NET Core 2.0+, Xamarin.Android 8.0+, Xamarin.iOS 10.14+, etc. (For more details, please refer to this table.)
Getting Started
1. Install the package with NuGet
Install-Package ConfigCat.Client
or
dotnet add package ConfigCat.Client
2. Import ConfigCat.Client to your application
using ConfigCat.Client;
3. Go to the ConfigCat Dashboard to get your SDK Key:
4. Create a ConfigCat client instance:
var client = ConfigCatClient.Get("#YOUR-SDK-KEY#");
You can acquire singleton client instances for your SDK keys using the
ConfigCatClient.Get(sdkKey: <sdkKey>)
static factory method. (However, please keep in mind that subsequent calls toConfigCatClient.Get()
with the same SDK Key return a shared client instance, which was set up by the first call.)
5. Get your setting value:
var isMyAwesomeFeatureEnabled = await client.GetValueAsync("isMyAwesomeFeatureEnabled", false);
if(isMyAwesomeFeatureEnabled)
{
doTheNewThing();
}
else
{
doTheOldThing();
}
6. On application exit:
client.Dispose();
To ensure graceful shutdown of the client you should invoke
.Dispose()
method. (Client implements IDisposable interface.) Alternatively, you can also close all open clients at once using theConfigCatClient.DisposeAll()
method.
Getting user specific setting values with Targeting
Using this feature, you will be able to get different setting values for different users in your application by passing a User Object
to the GetValue()
function.
Read more about Targeting here.
User currentUser = new User("435170f4-8a8b-4b67-a723-505ac7cdea92");
var isMyAwesomeFeatureEnabled = await client.GetValueAsync(
"isMyAwesomeFeatureEnabled",
defaultValue: false,
user: currentUser);
Sample/Demo apps
- Sample Console App
- Sample Multi-page Web App
- Sample Single-page Web App
- Sample Mobile/Windows Store App
Polling Modes
The ConfigCat SDK supports 3 different polling mechanisms to acquire the setting values from ConfigCat. After latest setting values are downloaded, they are stored in the internal cache then all requests are served from there. Read more about Polling Modes and how to use them at ConfigCat Docs.
Platform compatibility
The ConfigCat SDK supports all the widespread .NET JIT runtimes, everything that implements .NET Standard 2.0+ and supports TLS 1.2 should work. Starting with v9.3.0, it can also be used in applications that employ trimmed self-contained or various ahead-of-time (AOT) compilation deployment models.
Based on our tests, the SDK is compatible with the following runtimes/deployment models:
- .NET Framework 4.5+ (including Ngen)
- .NET Core 3.1, .NET 5+ (including Crossgen2/ReadyToRun and Native AOT)
- Mono 5.10+
- .NET for Android (formerly known as Xamarin.Android)
- .NET for iOS (formerly known as Xamarin.iOS)
- Unity 2021.3+ (Mono JIT)
- Unity 2021.3+ (IL2CPP)<sup><small>*</small></sup>
- Universal Windows Platform 10.0.16299.0+ (.NET Native)<sup><small>**</small></sup>
- WebAssembly (Mono AOT/Emscripten, also known as wasm-tools)
<sup><small>*</small></sup>Unity WebGL also works but needs a bit of extra effort: you will need to enable WebGL compatibility by calling the ConfigCatClient.PlatformCompatibilityOptions.EnableUnityWebGLCompatibility
method. For more details, see Sample Scripts.<br/>
<sup><small>**</small></sup>To make the SDK work in Release builds on UWP, you will need to add <Namespace Name="System.Text.Json.Serialization.Converters" Browse="Required All"/>
to your application's .rd.xml file. See also this discussion.
We strive to provide an extensive support for the various .NET runtimes and versions. If you still encounter an issue with the SDK on some platform, please open a GitHub issue or contact support.
Need help?
Contributing
Contributions are welcome. For more info please read the Contribution Guideline.
About ConfigCat
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. 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 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 is compatible. 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 | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.5
- Newtonsoft.Json (>= 13.0.2)
- System.Memory (>= 4.5.5)
- System.Text.RegularExpressions (>= 4.3.1)
- System.Threading.Tasks.Extensions (>= 4.5.4)
-
.NETFramework 4.6.1
- System.Text.Json (>= 6.0.10)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETStandard 2.0
- System.Text.Json (>= 6.0.10)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETStandard 2.1
- System.Text.Json (>= 6.0.10)
- System.Text.RegularExpressions (>= 4.3.1)
-
net5.0
- System.Text.Json (>= 6.0.10)
-
net6.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (7)
Showing the top 5 NuGet packages that depend on ConfigCat.Client:
Package | Downloads |
---|---|
Musement.Extensions.Configuration.ConfigCat
A .NET configuration provider for ConfigCat |
|
OpenFeature.Contrib.Providers.ConfigCat
ConfigCat provider for .NET |
|
Codelux
Codelux is a collection of tools that simplify and abstract processes such as dependency injection, caching, configuration, mapping etc. Codelux.ServiceStack includes various ServiceStack helper libraries that make OrmLite model mapping, dependency injection and bootstrapping simple, elegant and clean. Additionally, Codelux.Plugins provides a base plugin framework for a pluggable architecture design. |
|
Xamarin.Security
Add your app security control by using cloud's feature flags |
|
XamarinSecurityTest
Add your app security control by using cloud's feature flags |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on ConfigCat.Client:
Repository | Stars |
---|---|
VladislavAntonyuk/MauiSamples
.NET MAUI Samples
|
Version | Downloads | Last updated | |
---|---|---|---|
9.3.2 | 57,374 | 10/9/2024 | |
9.3.1 | 49,463 | 9/11/2024 | |
9.3.0 | 19,146 | 8/28/2024 | |
9.2.0 | 225,860 | 5/13/2024 | |
9.1.0 | 232,700 | 3/21/2024 | |
9.0.1 | 266,039 | 1/9/2024 | |
9.0.0 | 95,536 | 11/21/2023 | |
8.2.0 | 349,542 | 7/26/2023 | |
8.1.1 | 67,501 | 6/23/2023 | |
8.1.0 | 22,935 | 6/12/2023 | |
8.0.0 | 20,027 | 5/26/2023 | |
7.2.0 | 409,671 | 1/11/2023 | |
7.1.0 | 37,329 | 12/16/2022 | |
7.0.0 | 90,870 | 11/10/2022 | |
6.5.3 | 170,101 | 9/7/2022 | |
6.5.2 | 64,198 | 8/5/2022 | |
6.5.1 | 337,725 | 4/7/2022 | |
6.5.0 | 5,016 | 4/6/2022 | |
6.4.12 | 1,094 | 4/4/2022 | |
6.4.9 | 14,877 | 3/4/2022 | |
6.4.8 | 934 | 3/3/2022 | |
6.4.7 | 937 | 3/3/2022 | |
6.4.6 | 919 | 3/3/2022 | |
6.4.3 | 923 | 3/3/2022 | |
6.4.0 | 982 | 3/3/2022 | |
6.2.1 | 124,050 | 9/20/2021 | |
6.1.20 | 9,905 | 9/8/2021 | |
6.1.0 | 484,783 | 1/7/2021 | |
6.0.47 | 1,185 | 1/7/2021 | |
6.0.0 | 35,872 | 10/12/2020 | |
5.3.77 | 31,293 | 9/1/2020 | |
5.2.58 | 35,711 | 7/2/2020 | |
5.1.53 | 61,945 | 4/19/2020 | |
5.0.39 | 2,524 | 4/9/2020 | |
4.0.36 | 21,963 | 2/27/2020 | |
3.2.28 | 43,931 | 1/15/2020 | |
3.1.23 | 1,324 | 12/28/2019 | |
3.0.19 | 2,546 | 11/25/2019 | |
2.5.6 | 23,306 | 9/9/2019 | |
2.5.3 | 1,273 | 8/8/2019 | |
2.4.0 | 1,827 | 7/27/2019 | |
2.3.0 | 1,235 | 7/19/2019 | |
2.2.2 | 1,235 | 7/14/2019 | |
2.2.1 | 51,523 | 4/9/2019 | |
2.1.4 | 1,439 | 11/26/2018 | |
2.1.3 | 1,267 | 11/21/2018 | |
2.1.0 | 1,338 | 11/9/2018 | |
2.0.1 | 1,472 | 10/23/2018 | |
2.0.0 | 1,332 | 10/9/2018 | |
1.1.6 | 1,528 | 5/9/2018 | |
1.1.5 | 1,540 | 4/26/2018 | |
1.1.3 | 1,560 | 4/17/2018 | |
1.1.2 | 1,900 | 4/8/2018 |