Microsoft.Orleans.Serialization 9.2.1

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

No packages depend on Microsoft.Orleans.Serialization.

Version Downloads Last updated
9.2.1 1 09/13/2025
9.2.0 0 07/14/2025
9.2.0-preview3 0 06/10/2025
9.2.0-preview2 0 06/04/2025
9.2.0-preview1 0 04/04/2025
9.1.2 0 02/13/2025
9.0.1 0 11/23/2024
9.0.0 0 11/14/2024
8.2.0 0 07/12/2024
8.2.0-preview1 0 05/22/2024
8.1.0 0 04/17/2024
8.1.0-preview3 0 03/11/2024
8.1.0-preview2 0 02/23/2024
8.1.0-preview1 0 02/13/2024
8.0.0 0 01/05/2024
8.0.0-rc2 0 12/20/2023
8.0.0-rc1 0 12/04/2023
7.2.7 0 10/15/2024
7.2.6 0 03/09/2024
7.2.5 0 02/22/2024
7.2.4 0 12/02/2023
7.2.3 0 11/03/2023
7.2.2 0 10/16/2023
7.2.1 0 07/11/2023
7.2.0 0 07/07/2023
7.1.2 0 04/19/2023
7.1.1 0 03/23/2023
7.1.0 0 02/01/2023
7.0.0 0 11/08/2022
7.0.0-rc2 0 10/19/2022
4.0.0-preview2 0 08/04/2022
4.0.0-preview1 0 02/10/2022