Microsoft.Orleans.Serialization 9.2.0-preview2

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

Showing the top 20 packages that depend on Microsoft.Orleans.Serialization.

Packages Downloads
Microsoft.Orleans.Core.Abstractions
Core abstractions library of Microsoft Orleans
14
Microsoft.Orleans.Core.Abstractions
Core abstractions library of Microsoft Orleans
13
Microsoft.Orleans.Core.Abstractions
Core abstractions library of Microsoft Orleans
12
Microsoft.Orleans.Core.Abstractions
Core abstractions library of Microsoft Orleans
11
Microsoft.Orleans.Core.Abstractions
Core abstractions library of Microsoft Orleans
10

Version Downloads Last updated
9.2.0-preview3 2 06/14/2025
9.2.0-preview2 2 06/08/2025
9.2.0-preview1 7 04/14/2025
9.1.2 10 02/21/2025
9.1.0 3 05/12/2025
9.0.1 14 11/25/2024
9.0.0 9 11/25/2024
8.2.0 14 10/06/2024
8.2.0-preview1 9 10/09/2024
8.1.0 14 10/09/2024
8.1.0-preview3 12 10/09/2024
8.1.0-preview2 12 10/09/2024
8.1.0-preview1 12 10/09/2024
8.0.0 15 10/09/2024
8.0.0-rc2 9 10/09/2024
8.0.0-rc1 10 10/09/2024
7.2.7 13 11/25/2024
7.2.6 9 10/09/2024
7.2.5 13 10/09/2024
7.2.4 12 10/09/2024
7.2.3 9 10/09/2024
7.2.2 11 10/09/2024
7.2.1 14 10/09/2024
7.2.0 13 10/09/2024
7.1.2 10 10/09/2024
7.1.1 14 10/09/2024
7.1.0 13 10/09/2024
7.0.0 14 10/09/2024
7.0.0-rc2 13 10/09/2024
4.0.0-preview2 11 10/09/2024
4.0.0-preview1 14 10/09/2024