{"id":17753167,"url":"https://github.com/configcat/.net-sdk","last_synced_at":"2026-03-02T03:32:15.557Z","repository":{"id":33264282,"uuid":"128625741","full_name":"configcat/.net-sdk","owner":"configcat","description":"ConfigCat SDK for .NET. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.","archived":false,"fork":false,"pushed_at":"2026-02-20T20:17:27.000Z","size":1972,"stargazers_count":35,"open_issues_count":2,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-02-21T01:43:31.987Z","etag":null,"topics":["configcat","configuration","configuration-management","dotnet","dotnetcore","feature-flag","feature-flags","feature-toggle","feature-toggles","featureflags","netstandard","remote-config"],"latest_commit_sha":null,"homepage":"https://configcat.com/docs/sdk-reference/csharp","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/configcat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-04-08T09:45:41.000Z","updated_at":"2026-01-12T10:34:53.000Z","dependencies_parsed_at":"2024-03-27T18:32:09.178Z","dependency_job_id":"d95b445d-35a7-4d98-b2b2-b762963276c1","html_url":"https://github.com/configcat/.net-sdk","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/configcat/.net-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2F.net-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2F.net-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2F.net-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2F.net-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/configcat","download_url":"https://codeload.github.com/configcat/.net-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2F.net-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29991767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configcat","configuration","configuration-management","dotnet","dotnetcore","feature-flag","feature-flags","feature-toggle","feature-toggles","featureflags","netstandard","remote-config"],"created_at":"2024-10-26T13:23:03.935Z","updated_at":"2026-03-02T03:32:15.549Z","avatar_url":"https://github.com/configcat.png","language":"C#","readme":"# ConfigCat SDK for .NET\n\n[![Build status](https://github.com/configcat/.net-sdk/actions/workflows/dotnet-sdk-ci.yml/badge.svg?branch=master)](https://github.com/configcat/.net-sdk/actions/workflows/dotnet-sdk-ci.yml)\n[![NuGet Version](https://img.shields.io/nuget/v/ConfigCat.Client)](https://www.nuget.org/packages/ConfigCat.Client/)\n[![Sonar Coverage](https://img.shields.io/sonar/coverage/net-sdk?logo=SonarCloud\u0026server=https%3A%2F%2Fsonarcloud.io)](https://sonarcloud.io/project/overview?id=net-sdk) \n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=net-sdk\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=net-sdk)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/configcat/.net-sdk/blob/master/LICENSE)\n\nConfigCat SDK for .NET provides easy integration for your application to [ConfigCat](https://configcat.com).\n\n## Supported runtimes\n- .NET 5+\n- .NET Framework 4.5+\n- 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, see the [Platform compatiblity](#platform-compatibility) section below.)\n\n## Getting started\n\n### 1. Install the [package](https://www.nuget.org/packages/ConfigCat.Client) with [NuGet](http://docs.nuget.org/docs/start-here/using-the-package-manager-console) \n```PowerShell\nInstall-Package ConfigCat.Client\n```\nor\n```bash\ndotnet add package ConfigCat.Client\n```\n\n### 2. Import _ConfigCat.Client_ to your application\n```c#\nusing ConfigCat.Client;\n```\n\n### 3. Go to the \u003ca href=\"https://app.configcat.com/sdkkey\" target=\"_blank\"\u003eConfigCat Dashboard\u003c/a\u003e to get your _SDK Key_:\n![SDK-KEY](https://raw.githubusercontent.com/ConfigCat/.net-sdk/master/media/readme02-3.png  \"SDK-KEY\")\n\n### 4. Create a _ConfigCat client_ instance:\n```c#\nvar client = ConfigCatClient.Get(\"#YOUR-SDK-KEY#\");\n```\n\n\u003e [!NOTE]\n\u003e You can acquire singleton client instances for your SDK keys using the `ConfigCatClient.Get(sdkKey: \u003csdkKey\u003e)` static factory method.\n(However, please keep in mind that subsequent calls to `ConfigCatClient.Get()` with the _same SDK Key_ return a _shared_ client instance, which was set up by the first call.)\n\n### 5. Get your setting value:\n```c#\nvar isMyAwesomeFeatureEnabled = await client.GetValueAsync(\"isMyAwesomeFeatureEnabled\", false);\n\nif (isMyAwesomeFeatureEnabled)\n{\n    doTheNewThing();\n}\nelse\n{\n    doTheOldThing();\n}\n```\n\n### 6. On application exit:\n```c#\nclient.Dispose();\n```\n\n\u003e [!NOTE]\n\u003e To ensure graceful shutdown of the client, you should invoke the `Dispose()` method. (The client implements the [IDisposable](https://learn.microsoft.com/en-us/dotnet/api/system.idisposable) interface.)\n\u003e Alternatively, you can close all open clients at once using the `ConfigCatClient.DisposeAll()` method.\n\n## Getting user-specific setting values with targeting\n\nThis feature allows you to get different setting values for different users in your application by passing a [User Object](https://configcat.com/docs/targeting/user-object/) to `GetValueAsync()`.\n\nRead more about targeting [here](https://configcat.com/docs/advanced/targeting/).\n\n```c#\nvar currentUser = new User(\"#USER-IDENTIFIER#\");\n\nvar isMyAwesomeFeatureEnabled = await client.GetValueAsync(\n  \"isMyAwesomeFeatureEnabled\",\n  defaultValue: false,\n  user: currentUser);\n```\n\n## Sample/demo apps\n  * [Sample Console App](https://github.com/configcat/.net-sdk/tree/master/samples/ConsoleApp)\n  * [Sample Multi-page Web App](https://github.com/configcat/.net-sdk/tree/master/samples/ASP.NETCore)\n  * [Sample Single-page Web App](https://github.com/configcat/.net-sdk/tree/master/samples/BlazorWasm)\n  * [Sample Mobile/Windows Store App](https://github.com/configcat/.net-sdk/tree/master/samples/MAUI)\n\n## Polling modes\nThe ConfigCat SDK supports 3 different polling strategies to fetch feature flags and settings from the ConfigCat CDN. Once the latest data is downloaded, it is stored in the cache, then the SDK uses the cached data to evaluate feature flags and settings. Read more about polling modes and how to use them at [ConfigCat Docs](https://configcat.com/docs/sdk-reference/dotnet/#polling-modes).\n\n## Platform compatibility\nThe ConfigCat SDK supports all the widespread .NET JIT runtimes, everything that implements [.NET Standard 2.0](https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-0)+ and supports TLS 1.2 should work.\nStarting with v9.3.0, it can also be used in applications that employ [trimmed self-contained](https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trim-self-contained) or various [ahead-of-time (AOT) compilation](https://en.wikipedia.org/wiki/Ahead-of-time_compilation) deployment models.\n\nBased on our tests, the SDK is compatible with the following runtimes/deployment models:\n* .NET Framework 4.5+ (including Ngen)\n* .NET Core 3.1, .NET 5+ (including Crossgen2/ReadyToRun and Native AOT)\n* Mono 5.10+\n* .NET for Android (formerly known as Xamarin.Android)\n* .NET for iOS (formerly known as Xamarin.iOS)\n* Unity 2021.3+ (Mono JIT)\n* Unity 2021.3+ (IL2CPP)\u003csup\u003e\u003csmall\u003e*\u003c/small\u003e\u003c/sup\u003e\n* Universal Windows Platform 10.0.16299.0+ (.NET Native)\u003csup\u003e\u003csmall\u003e**\u003c/small\u003e\u003c/sup\u003e\n* WebAssembly (Mono AOT/Emscripten, also known as wasm-tools)\n\n\u003csup\u003e\u003csmall\u003e*\u003c/small\u003e\u003c/sup\u003eUnity 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](https://github.com/configcat/.net-sdk/tree/master/samples/UnityWebGL).\u003cbr/\u003e\n\u003csup\u003e\u003csmall\u003e**\u003c/small\u003e\u003c/sup\u003eTo make the SDK work in Release builds on UWP, you will need to add `\u003cNamespace Name=\"System.Text.Json.Serialization.Converters\" Browse=\"Required All\"/\u003e` to your application's [.rd.xml](https://learn.microsoft.com/en-us/windows/uwp/dotnet-native/runtime-directives-rd-xml-configuration-file-reference) file. See also [this discussion](https://github.com/dotnet/runtime/issues/29912#issuecomment-638471351).\n\n\u003e [!NOTE]\n\u003e 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](https://github.com/configcat/.net-sdk/issues/new/choose) or [contact support](https://configcat.com/support).\n\n## Need help?\nhttps://configcat.com/support\n\n## Contributing\nContributions are welcome. For more info please read the [Contribution Guideline](CONTRIBUTING.md).\n\n## About ConfigCat\nConfigCat is a feature flag and configuration management service that lets you separate releases from deployments. You can turn your features ON/OFF using \u003ca href=\"https://app.configcat.com\" target=\"_blank\"\u003eConfigCat Dashboard\u003c/a\u003e even after they are deployed. ConfigCat lets you target specific groups of users based on region, email or any other custom user attribute.\n\nConfigCat is a \u003ca href=\"https://configcat.com\" target=\"_blank\"\u003ehosted feature flag service\u003c/a\u003e. Manage feature toggles across frontend, backend, mobile, desktop apps. \u003ca href=\"https://configcat.com\" target=\"_blank\"\u003eAlternative to LaunchDarkly\u003c/a\u003e. Management app + feature flag SDKs.\n\n- [Official ConfigCat SDKs for other platforms](https://github.com/configcat#-official-open-source-sdks)\n- [Documentation](https://configcat.com/docs)\n- [Blog](https://configcat.com/blog)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2F.net-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconfigcat%2F.net-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2F.net-sdk/lists"}