Microsoft.Orleans.Serialization
9.2.0-preview3
Prefix Reserved
dotnet add package Microsoft.Orleans.Serialization --version 9.2.0-preview3
NuGet\Install-Package Microsoft.Orleans.Serialization -Version 9.2.0-preview3
<PackageReference Include="Microsoft.Orleans.Serialization" Version="9.2.0-preview3" />
<PackageVersion Include="Microsoft.Orleans.Serialization" Version="9.2.0-preview3" />
<PackageReference Include="Microsoft.Orleans.Serialization" />
paket add Microsoft.Orleans.Serialization --version 9.2.0-preview3
#r "nuget: Microsoft.Orleans.Serialization, 9.2.0-preview3"
#addin nuget:?package=Microsoft.Orleans.Serialization&version=9.2.0-preview3&prerelease
#tool nuget:?package=Microsoft.Orleans.Serialization&version=9.2.0-preview3&prerelease
Microsoft Orleans Serialization
Introduction
Microsoft Orleans Serialization is a fast, flexible, and version-tolerant serializer for .NET. It provides the core serialization capabilities for Orleans, enabling efficient serialization and deserialization of data across the network and for storage.
Getting Started
To use this package, install it via NuGet:
dotnet add package Microsoft.Orleans.Serialization
This package is automatically included when you reference the Orleans SDK or the Orleans client/server metapackages.
Example
// Creating a serializer
var services = new ServiceCollection();
services.AddSerializer();
var serviceProvider = services.BuildServiceProvider();
var serializer = serviceProvider.GetRequiredService<Serializer>();
// Serializing an object
var bytes = serializer.SerializeToArray(myObject);
// Deserializing an object
var deserializedObject = serializer.Deserialize<MyType>(bytes);
Supporting your own Types
To make your types serializable in Orleans, mark them with the [GenerateSerializer]
attribute and mark each field/property which should be serialized with the [Id(int)]
attribute:
[GenerateSerializer]
public class MyClass
{
[Id(0)]
public string Name { get; set; }
[Id(1)]
public int Value { get; set; }
}
Documentation
For more comprehensive documentation, please refer to:
Feedback & Contributing
- If you have any issues or would like to provide feedback, please open an issue on GitHub
- Join our community on Discord
- Follow the @msftorleans Twitter account for Orleans announcements
- Contributions are welcome! Please review our contribution guidelines
- This project is licensed under the MIT license
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Microsoft.CodeAnalysis.Analyzers (>= 3.11.0)
- Microsoft.CodeAnalysis.Common (>= 4.5.0)
- Microsoft.CodeAnalysis.Workspaces.Common (>= 4.5.0)
- Microsoft.DotNet.PlatformAbstractions (>= 3.1.6)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.DependencyModel (>= 8.0.2)
- Microsoft.Extensions.ObjectPool (>= 8.0.11)
- Microsoft.Extensions.Options (>= 8.0.2)
- Microsoft.Orleans.Analyzers (>= 9.2.0-preview3)
- Microsoft.Orleans.CodeGenerator (>= 9.2.0-preview3)
- Microsoft.Orleans.Serialization.Abstractions (>= 9.2.0-preview3)
- System.Collections.Immutable (>= 8.0.0)
- System.IO.Hashing (>= 8.0.0)
- System.IO.Pipelines (>= 8.0.0)
- System.Text.Json (>= 8.0.5)
-
net8.0
- Microsoft.CodeAnalysis.Analyzers (>= 3.11.0)
- Microsoft.CodeAnalysis.Common (>= 4.5.0)
- Microsoft.CodeAnalysis.Workspaces.Common (>= 4.5.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.DependencyModel (>= 8.0.2)
- Microsoft.Extensions.ObjectPool (>= 8.0.11)
- Microsoft.Extensions.Options (>= 8.0.2)
- Microsoft.Orleans.Analyzers (>= 9.2.0-preview3)
- Microsoft.Orleans.CodeGenerator (>= 9.2.0-preview3)
- Microsoft.Orleans.Serialization.Abstractions (>= 9.2.0-preview3)
- System.Collections.Immutable (>= 8.0.0)
- System.IO.Hashing (>= 8.0.0)
- System.IO.Pipelines (>= 8.0.0)
NuGet packages (21)
Showing the top 5 NuGet packages that depend on Microsoft.Orleans.Serialization:
Package | Downloads |
---|---|
Microsoft.Orleans.Core.Abstractions
Core abstractions library of Microsoft Orleans |
|
Microsoft.Orleans.Serialization.SystemTextJson
System.Text.Json integration for Orleans.Serialization |
|
Microsoft.Orleans.Serialization.NewtonsoftJson
Newtonsoft.Json integration for Orleans.Serialization |
|
Orleans.Persistence.Redis
Microsoft Orleans persistence provider backed by Redis |
|
Microsoft.Orleans.Serialization.Protobuf
Google.Protobuf integration for Orleans.Serialization |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Microsoft.Orleans.Serialization:
Repository | Stars |
---|---|
Cysharp/MemoryPack
Zero encoding extreme performance binary serializer for C# and Unity.
|
Version | Downloads | Last Updated |
---|---|---|
9.2.0-preview3 | 881 | 6/10/2025 |
9.2.0-preview2 | 669 | 6/4/2025 |
9.2.0-preview1 | 16,786 | 4/4/2025 |
9.1.2 | 337,486 | 2/13/2025 |
9.0.1 | 252,974 | 11/23/2024 |
9.0.0 | 21,075 | 11/14/2024 |
8.2.0 | 788,187 | 7/12/2024 |
8.2.0-preview1 | 7,458 | 5/22/2024 |
8.1.0 | 494,408 | 4/17/2024 |
8.1.0-preview3 | 5,910 | 3/11/2024 |
8.1.0-preview2 | 1,982 | 2/23/2024 |
8.1.0-preview1 | 2,436 | 2/13/2024 |
8.0.0 | 502,752 | 1/5/2024 |
8.0.0-rc2 | 2,931 | 12/20/2023 |
8.0.0-rc1 | 2,915 | 12/4/2023 |
7.2.7 | 8,935 | 10/15/2024 |
7.2.6 | 108,816 | 3/9/2024 |
7.2.5 | 21,524 | 2/22/2024 |
7.2.4 | 371,130 | 12/2/2023 |
7.2.3 | 165,471 | 11/3/2023 |
7.2.2 | 88,979 | 10/16/2023 |
7.2.1 | 596,758 | 7/11/2023 |
7.2.0 | 415,435 | 7/7/2023 |
7.1.2 | 285,276 | 4/19/2023 |
7.1.1 | 117,027 | 3/23/2023 |
7.1.0 | 286,340 | 2/1/2023 |
7.0.0 | 412,200 | 11/8/2022 |
7.0.0-rc2 | 2,594 | 10/19/2022 |
4.0.0-preview2 | 25,805 | 8/4/2022 |
4.0.0-preview1 | 29,134 | 2/10/2022 |