protobuf-net 3.4.40

protobuf-net

A contract-based serializer for .NET that reads and writes Google's "protocol buffers" wire format. The API follows normal .NET patterns — broadly comparable to XmlSerializer or DataContractSerializer — so you annotate the types you already have:

[ProtoContract]
public class Person
{
    [ProtoMember(1)] public int Id { get; set; }
    [ProtoMember(2)] public string Name { get; set; }
}

using var file = File.Create("person.bin");
Serializer.Serialize(file, new Person { Id = 12345, Name = "Fred" });

Members are identified on the wire by number, not by name, so the numbers matter: pick them once and keep them stable. Everything the attributes do can also be configured at runtime, via RuntimeTypeModel.

Contract-first works too: generate C#/VB from a .proto schema at build time, from the command line with protobuf-net.Protogen, or in your browser at protobuf-net.dev.

Build tools — analyzers that check your contracts, and the generator that emits serializers at compile time so native AOT and trimming work — ship with this package by default; opt out with <ProtoBufDisableBuildTools>true</ProtoBufDisableBuildTools>.

More

Showing the top 20 packages that depend on protobuf-net.

Packages Downloads
prometheus-net
.NET client for prometheus.io
29
prometheus-net
.NET metrics exporter for the Prometheus monitoring and alerting system
26
prometheus-net
.NET metrics exporter for the Prometheus monitoring and alerting system
25
protobuf-net.Reflection
ProtoBuf DSL (proto2 / proto3) and desccriptor tools for protobuf-net
24
prometheus-net
.NET client for prometheus.io
24
prometheus-net
.NET client for prometheus.io
23
ProtoBufJsonConverter
Convert a protobuf message to a JSON string or object (and back) using the proto definition file.
22
ProtoBufJsonConverter
Convert a protobuf message to a JSON string or object (and back) using the proto definition file.
21
prometheus-net
.NET metrics exporter for the Prometheus monitoring and alerting system
21
prometheus-net
.NET metrics exporter for the Prometheus monitoring and alerting system
20
prometheus-net
.NET client for prometheus.io
20
protobuf-net.Reflection
ProtoBuf DSL (proto2 / proto3) and descriptor tools for protobuf-net
20
protobuf-net.Reflection
ProtoBuf DSL (proto2 / proto3) and descriptor tools for protobuf-net
19
prometheus-net
.NET client for prometheus.io
19
prometheus-net
.NET metrics exporter for the Prometheus monitoring and alerting system
19

.NET Framework 4.6.2

.NET 8.0

.NET Standard 2.0

.NET Standard 2.1

Version Downloads Last updated
3.4.40 7 10/28/2026
3.4.30 13 09/19/2026
3.4.29 8 10/02/2026
3.4.28 11 09/20/2026
3.4.21 15 09/03/2026
3.4.19 15 08/27/2026
3.4.14 23 08/26/2026
3.4.0 17 08/25/2026
3.3.21 19 08/19/2026
3.3.8 20 08/12/2026
3.3.0 21 08/12/2026
3.2.56 12 06/23/2026
3.2.55 13 06/23/2026
3.2.52 19 06/23/2026
3.2.46 21 06/24/2026
3.2.45 16 06/24/2026
3.2.30 20 06/23/2026
3.2.26 14 06/23/2026
3.2.16 16 06/24/2026
3.2.12 17 06/23/2026
3.2.8 14 06/23/2026
3.2.0 18 06/23/2026
3.1.33 17 06/23/2026
3.1.26 15 06/24/2026
3.1.25 22 06/24/2026
3.1.22 15 06/23/2026
3.1.17 16 06/23/2026
3.1.4 10 06/23/2026
3.1.0 19 06/23/2026
3.0.131 27 06/23/2026
3.0.101 26 06/23/2026
3.0.73 18 06/23/2026
3.0.72 24 06/24/2026
3.0.62 18 06/24/2026
3.0.52 12 06/24/2026
3.0.29 10 06/24/2026
3.0.27 20 06/24/2026
3.0.24 13 06/24/2026
3.0.21 16 06/29/2026
3.0.18 17 06/24/2026
3.0.13 15 06/23/2026
3.0.2 13 06/23/2026
3.0.0 15 06/23/2026
2.4.9 19 06/23/2026
2.4.8 20 06/23/2026
2.4.7 18 06/23/2026
2.4.6 14 06/23/2026
2.4.4 15 06/23/2026
2.4.1 11 06/23/2026
2.4.0 18 06/23/2026
2.3.17 21 06/24/2026
2.3.16 22 06/24/2026
2.3.15 20 06/24/2026
2.3.14 18 06/24/2026
2.3.14-alpha1 19 06/23/2026
2.3.13 20 06/23/2026
2.3.7 19 06/23/2026
2.3.6 20 06/23/2026
2.3.5 20 06/23/2026
2.3.4 18 06/23/2026
2.3.3 18 06/23/2026
2.3.2 10 06/23/2026
2.3.1 22 06/23/2026
2.3.0 14 06/23/2026
2.3.0-gamma 13 07/03/2026
2.2.1 13 06/23/2026
2.1.0 26 06/23/2026
2.1.0-alpha-5 16 06/27/2026
2.1.0-alpha-4 12 07/08/2026
2.1.0-alpha-3 12 06/29/2026
2.1.0-alpha-1 16 06/29/2026
2.0.0.668 18 07/16/2026
2.0.0.666 13 06/23/2026
2.0.0.664 19 07/16/2026
2.0.0.663 14 06/29/2026
2.0.0.640 17 06/23/2026
2.0.0.638 23 06/27/2026
2.0.0.621 12 07/16/2026
2.0.0.619 14 07/09/2026
2.0.0.614 21 06/27/2026
2.0.0.612 30 07/05/2026
2.0.0.611 23 07/16/2026
2.0.0.602 24 06/23/2026
2.0.0.601 21 06/23/2026
2.0.0.480 16 06/23/2026
1.0.0.280 20 06/23/2026