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
Lib.Serialize
Package Description
59
Lib.Serialize
Package Description
43
Lib.NamedPipeWrapper
Package Description
33
Lib.Discovery
Package Description
29
Lib.Discovery
Package Description
17
Lib.NamedPipeWrapper
Package Description
14
Lib.Serialize
Package Description
4
Lib.Discovery
Package Description
2
Lib.NamedPipeWrapper
Package Description
1

https://github.com/protobuf-net/protobuf-net/releases

.NET Framework 4.6.2

.NET 8.0

.NET Standard 2.0

.NET Standard 2.1

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