protobuf/csharp
2015-06-25 09:39:29 +01:00
..
build Imported protobuf-csharp-port into csharp/ tree 2015-04-16 09:55:22 -07:00
keys Imported protobuf-csharp-port into csharp/ tree 2015-04-16 09:55:22 -07:00
protos/extest First pass at the mutable API. Quite a bit more to do - in particular, it's pretty slow right now. 2015-06-09 19:30:44 +01:00
src Generated map code. 2015-06-25 09:39:29 +01:00
testdata Imported protobuf-csharp-port into csharp/ tree 2015-04-16 09:55:22 -07:00
.gitignore adding what was missing in .gitignore 2015-05-12 15:21:59 -07:00
buildall.sh Get the Mono build script working again. 2015-06-25 08:59:35 +01:00
CHANGES.txt Updated readme.md and changes.txt, removed old license.txt 2015-04-16 10:23:54 -07:00
generate_protos.sh Updates to handle use of cmake for Windows builds. 2015-06-17 15:16:14 +01:00
README.md Update the readme to give more context of what's going on. 2015-06-19 17:33:20 +01:00

This directory contains the C# Protocol Buffers runtime library.

Warning: experimental!

This code is still under significant churn. Unlike the original port, it only supports proto3 (but not all of proto3 yet) - there are no unknown fields or extensions, for example. protoc will (eventually) deliberately fail if it is asked to generate C# code for proto2 messages other than descriptor.proto, which is still required for reflection. (It's currently exposed publicly, but won't be eventually.)

Also unlike the original port, the new version embraces mutability - there are no builder types. We plan to add "freezing" operations as well as cloning, however.

Usage

The easiest way to use C# protocol buffers in your project is to use the Google.ProtocolBuffers NuGet package. This package is the legacy package for C# protocol buffers, but it will work fine with C# code generated by protoc if you use proto2 syntax (The API of the runtime library haven't changed so far).

We will definitely release a new NuGet package for the runtime library in the future. The new runtime library WILL contain significant semantic, backwardly-incompatible changes in proto handling (mostly because we will be adding proto3 support and we will be using that oportunity to make some design changes). So keep in mind that you will need to regenerate your proto files and switch to a new NuGet package once the new version of runtime library becomes available.

Building

Open the src/ProtocolBuffers.sln solution in Visual Studio. Click "Build solution" to build the solution. You should be able to run the NUnit test from Test Explorer (you might need to install NUnit Visual Studio add-in).

Supported Visual Studio versions are VS2013 (update 4) and VS2015. On Linux, you can also use Monodevelop 5.9 (older versions might work fine).

History of C# protobufs

This subtree was originally imported from https://github.com/jskeet/protobuf-csharp-port and represents the latest development version of C# protobufs, that will now be developed and maintained by Google. All the development will be done in open, under this repository (https://github.com/google/protobuf).