All notable changes to this project are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
This changelog was reconstructed from the project's commit history and published NuGet releases; entries for older versions are a best-effort summary.
- Enabled NuGet lock files (
packages.lock.json) across the solution for reproducible, pinned dependency restores. CI restores in locked mode so a missing or out-of-date lock file fails the build. No runtime or API changes.
AutoDiscoverKnownTypesoption on the serializers (andExpressionSerializer). When enabled, the runtime types of constant values found in an expression are walked and registered as known types automatically during serialization, so expressions that capture custom types or enum values no longer require a manualAddKnownTypecall for each such type (#158).
- The option is opt-in and off by default, so existing behavior is unchanged. Discovery inspects constant
value types (and their array element / generic argument types) statically — the constant values are never
enumerated, so lazy sequences such as
IQueryableare not executed. - Discovery runs on the serialization side; the discovered types are added to the serializer instance, so a serialize/deserialize round-trip on the same instance works without extra registration. When deserializing on a different instance, register the types there as usual.
ITypeFilterextension point onExpressionContextto restrict which types may be resolved while deserializing an expression tree — the equivalent ofBinaryFormatter'sSerializationBinderfor guarding against untrusted payloads. A rejected type throwsTypeNotAllowedException. Built-in implementationsAllowedTypesFilter(allow-list by type/open-generic/namespace) andDelegateTypeFilter(predicate) are provided, plus newExpressionContextconstructor overloads accepting anITypeFilterand aDeserialize(Stream, IExpressionContext)overload (#151).
- The filter is consulted for every resolved type, including the open generic definition
and each generic argument of a closed generic (e.g.
List<Customer>is checked asList<>andCustomer). It is applied on cache hits too, so a restricted context cannot be bypassed. With no filter set (the default), behavior is unchanged and all types resolve.
- Option to pass a custom
ISerializationSurrogateProviderto the serializers via the newDataSerializer.SerializationSurrogateProviderproperty, allowing callers to customize serialization and add support for otherwise unsupported types (#178).
- The surrogate provider is honored by the XML serializer only. The JSON serializer
(
DataContractJsonSerializer) does not apply surrogate providers (dotnet/runtime#100553). - The property is available on the
net6.0–net10.0andnetstandard2.1targets; it is not exposed onnet48/net481/netstandard2.0, which lackISerializationSurrogateProvider.
- Support for .NET 10 (
net10.0).
- Replaced AppVeyor with GitHub Actions for CI; publishing now uses NuGet trusted publishing (OIDC) instead of a stored API key.
- Added Dependabot configuration for NuGet updates.
- Documentation updates (README supported platforms, project guidance).
- Support for .NET 9 (
net9.0).
- Support for .NET 8 (
net8.0) and .NET Framework 4.8.1 (net481). DateOnlyandTimeOnlyadded to the known types.
- Serialization of unbound
ToStringexpressions (#169).
- Dropped .NET 5 target (out of support).
- Support for .NET 7 (
net7.0). netstandard2.0andnetstandard2.1targets.- README is now included in the NuGet package.
- Suppressed
SYSLIB0011warnings during the transition away fromBinaryFormatter.
- Do not explode interface types as nullable types (#163).
- Removed
BinaryFormatSerializer/BinaryFormatter-based serialization due to security concerns.
- Support for .NET 5 (
net5.0). - Symbol package (
.snupkg) support.
- License changed to MIT; removed legacy copyright/license headers.
- Added support for
DefaultExpression(#146). DateTimeOffsetadded to the known types (#107).
- Removed deprecated target frameworks and example projects.
- Follow-up fix for finding the real constant value (#113).
- Support for
IndexExpressionserialization (#119).
- Try harder to find the real constant value (#113).
- Fix for member access on constant values (#105).
- Removed obsolete Silverlight/Windows Phone compiler switches.
DateTimeOffsetadded as a known type (#107).
- Updated
Microsoft.Data.ODatareference (security alert).
- Baseline release.