This release focuses on modernizing and further improving the SDK at the expense of removing support for some deprecated .NET runtimes:
- Introduces a new package named
ConfigCat.Extensions.Hosting, which provides a streamlined way to integrate the ConfigCat SDK into ASP.NET Core applications and other modern .NET applications built on .NET Generic Host (Microsoft.Extensions.Hosting) or .NET's standard dependency injection (Microsoft.Extensions.DependencyInjection). - Further improves performance and achieves zero-allocation evaluation for feature flags where no hashing is necessary.
- Drops support for .NET Framework 4.5 through 4.6.1. (For these runtimes, v9.x can still be used as long as Config JSON schema V6 is supported. However, please note that v9.x will not be actively maintained.)
New features:
- Introduce the
ConfigCat.Extensions.Hostingpackage for ASP.NET Core and other modern DI-based applications. (#137) - Expose
IOverrideDataSourceand a publicFlagOverridesconstructor to allow consumers to implement custom flag override data sources. (#126) - Expose
Config.DeserializeandSetting.FromValueto support testing and implementing custom flag override data sources. (#112)
Improvements:
- Mark the
ConfigCat.ClientandConfigCat.Extensions.Hostingassemblies as CLS compliant. (#140) - Allow
IReadOnlyList<string>andIList<string>objects as user attributes for string array-based comparators. (#140) - Allow preparsed
SemVersionobjects as user attributes for semantic version comparators. (#127) - Make a minor performance improvement to
AutoPollConfigService. (#127) - Improve feature flag evaluation performance (both in terms of execution time and memory allocation): (#127)
Method LogInfo Mean Error Allocated Basic_v9.5.0 False 46.46 ns 0.427 ns 104 B Basic_v10.0.0 False 45.97 ns 0.554 ns - Complex_v9.5.0 False 2,520.96 ns 20.768 ns 4912 B Complex_v10.0.0 False 876.52 ns 6.109 ns 104 B - Update sample applications to .NET 10. (#137)
- Add a new Windows service sample application. (#137)
Breaking changes:
- Drop support for end-of-life .NET Framework versions 4.5 through 4.6.1. Also, stop targeting .NET 5 (though it remains supported via .NET Standard 2.1). (#109)
- Remove the obsolete
HttpClientHandleroption. Alternative:options.ConfigFetcher = new HttpClientConfigFetcher((_, _) => new HttpClient(handler, disposeHandler: false)). - Change the return type of
IConfigCatClient.GetValueAsyncand other asynchronous feature flag evaluation methods toValueTask. If you directly await these methods, you will only need to recompile your code. Otherwise, you may need to make some adjustments to it, keeping the do's and don'ts of ValueTasks in mind. (#127) - Remove the obsolete
IConfigCatClient.GetValueand other block waiting synchronous feature flag evaluation methods. Alternative:Snapshot().GetValue()(non-blocking synchronous feature flag evaluation). (#109) - Remove the obsolete
IConfigCatClient.ForceRefreshmethod. Alternative:ForceRefreshAsync().GetAwaiter.GetResult()(do this only if absolutely necessary, and with great caution). (#109) - Change the return type of
IConfigCatCache.GetAsync/SetAsyncmethods toValueTask. (#109) - Remove the
IConfigCatCache.Get/Setmethods. Alternative: return a completedValueTaskfromGetAsync/SetAsync. (#109) - Remove config model interfaces, such as
IConfig,ISetting, etc., and expose classes with an identical public API instead. Alternative:Config,Setting, etc. (#112) - Convert
EvaluationDetailsandEvaluationDetails<TValue>to a read-only value type with an identical public API, apart from the public constructor ofEvaluationDetails<TValue>. Alternative: theEvaluationDetails.SuccessandEvaluationDetails.Failurestatic factory methods can be used instead. (Implicit/explicit conversions are still defined between the new types to mimic the original type conversion behavior.) (#127) - Remove implicit conversion from
stringtoSemVersion. (#127)