![]() |
VOOZH | about |
dotnet add package Microsoft.Orleans.Serialization.Protobuf --version 10.2.0
NuGet\Install-Package Microsoft.Orleans.Serialization.Protobuf -Version 10.2.0
<PackageReference Include="Microsoft.Orleans.Serialization.Protobuf" Version="10.2.0" />
<PackageVersion Include="Microsoft.Orleans.Serialization.Protobuf" Version="10.2.0" />Directory.Packages.props
<PackageReference Include="Microsoft.Orleans.Serialization.Protobuf" />Project file
paket add Microsoft.Orleans.Serialization.Protobuf --version 10.2.0
#r "nuget: Microsoft.Orleans.Serialization.Protobuf, 10.2.0"
#:package Microsoft.Orleans.Serialization.Protobuf@10.2.0
#addin nuget:?package=Microsoft.Orleans.Serialization.Protobuf&version=10.2.0Install as a Cake Addin
#tool nuget:?package=Microsoft.Orleans.Serialization.Protobuf&version=10.2.0Install as a Cake Tool
Microsoft Orleans Serialization for Protobuf provides Protocol Buffers (Protobuf) serialization support for Microsoft Orleans using Google.Protobuf. This package integrates Google's official Google.Protobuf library with Orleans, allowing you to use Protocol Buffers messages in your grain interfaces and implementations.
To use this package, install it via NuGet:
dotnet add package Microsoft.Orleans.Serialization.Protobuf
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Orleans.Hosting;
using Orleans.Serialization;
var builder = Host.CreateApplicationBuilder(args)
.UseOrleans(siloBuilder =>
{
siloBuilder
.UseLocalhostClustering()
// Configure Protobuf as a serializer
.AddSerializer(serializerBuilder => serializerBuilder.AddProtobufSerializer());
});
// Run the host
await builder.RunAsync();
This package supports types generated from .proto files using Google.Protobuf. For detailed information on creating Protobuf messages and configuring your project, see Create Protobuf messages for .NET apps.
Once you have defined your Protobuf messages and configured code generation, you can use them directly in your grain interfaces:
using Orleans;
using MyApp.Models;
public interface IMyGrain : IGrainWithStringKey
{
Task<MyProtobufClass> GetData();
Task SetData(MyProtobufClass data);
}
public class MyGrain : Grain, IMyGrain
{
private MyProtobufClass _data;
public Task<MyProtobufClass> GetData() => Task.FromResult(_data);
public Task SetData(MyProtobufClass data)
{
_data = data;
return Task.CompletedTask;
}
}
Note: Google.Protobuf collection types (RepeatedField<T>, MapField<TKey, TValue>, and ByteString) are automatically supported.
For more comprehensive documentation, please refer to:
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 netstandard2.1 is compatible. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 4 NuGet packages that depend on Microsoft.Orleans.Serialization.Protobuf:
| Package | Downloads |
|---|---|
|
FunctionTestHost
Host for integration testing Azure Isolated Functions |
|
|
Microsoft.AutoGen.RuntimeGateway.Grpc
A programming framework for agentic AI |
|
|
Orleans.Streaming.EventStore
EventStore Grpc client implementation of streaming for Microsoft Orleans Streaming. |
|
|
FunctionTestHost.ServiceBus
Host for integration testing Azure Isolated Functions |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.2.0 | 2,575 | 6/12/2026 |
| 10.1.1-preview.1 | 64 | 5/13/2026 |
| 10.1.0 | 25,536 | 4/14/2026 |
| 10.0.1 | 19,093 | 2/7/2026 |
| 10.0.0 | 2,025 | 1/20/2026 |
| 10.0.0-rc.2 | 389 | 12/31/2025 |
| 9.2.1 | 58,819 | 7/16/2025 |
| 9.2.0 | 1,507 | 7/14/2025 |
| 9.2.0-preview3 | 609 | 6/10/2025 |
| 9.2.0-preview2 | 210 | 6/4/2025 |
| 9.2.0-preview1 | 422 | 4/4/2025 |
| 9.1.2 | 44,170 | 2/13/2025 |
| 9.0.1 | 48,152 | 11/23/2024 |
| 9.0.0 | 1,353 | 11/14/2024 |
| 8.2.0 | 53,819 | 7/12/2024 |
| 8.2.0-preview1 | 211 | 5/22/2024 |
| 8.1.0 | 32,533 | 4/17/2024 |
| 7.2.7 | 250 | 10/15/2024 |