ProtoBuf DSL (proto2 / proto3) and descriptor tools for protobuf-net
Get Started
| Product | Versions |
|---|---|
| .NET Standard | |
| Other |
README
protobuf-net.Reflection
The .proto schema tooling behind protobuf-net, as a library: parse proto2/proto3 schemas into a
FileDescriptorSet, inspect or manipulate the descriptors, and generate C# or VB source from them.
var set = new FileDescriptorSet();
set.AddImportPath(".");
set.Add("person.proto", includeInOutput: true);
set.Process();
foreach (var file in CSharpCodeGenerator.Default.Generate(set))
{
Console.WriteLine(file.Name);
Console.WriteLine(file.Text);
}
The common imports (google/protobuf/*.proto and friends) are embedded, so they resolve without being on
disk. This is the same code generation used by the
protogen command-line tool and by
protobuf-net.dev; if you just want generated types, prefer one of those, or the
build-time generation described below.
More
Downloads by Version
Similar & Alternative Packages
Hand-picked matching NuGet libraries based on tags & ecosystem
Depended On By
Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.