OLD | NEW |
(Empty) | |
| 1 This directory contains the C# Protocol Buffers runtime library. |
| 2 |
| 3 Status: Alpha - ready for early adopters |
| 4 ======================================== |
| 5 |
| 6 This code is still under significant churn. Unlike the original port, |
| 7 it only supports proto3 (but not *all* of proto3 yet) - there are no |
| 8 unknown fields or extensions, for example. protoc will (eventually) |
| 9 deliberately fail if it is asked to generate C# code for proto2 |
| 10 messages other than descriptor.proto, which is still required for |
| 11 reflection. (It's currently exposed publicly, but won't be |
| 12 eventually.) |
| 13 |
| 14 Also unlike the original port, the new version embraces mutability - |
| 15 there are no builder types. |
| 16 |
| 17 Usage |
| 18 ===== |
| 19 |
| 20 The easiest way how to use C# protobufs is via the `Google.Protobuf` |
| 21 NuGet package. Just add the NuGet package to your VS project. |
| 22 |
| 23 Besides C# runtime library, the NuGet package also contains |
| 24 precompiled version of `protoc.exe` and a copy of well known `.proto` |
| 25 files under the package's `tools` directory. |
| 26 |
| 27 To generate C# files from your `.proto` files, invoke `protoc` with the |
| 28 `--csharp_out` option. |
| 29 |
| 30 Supported platforms |
| 31 =================== |
| 32 |
| 33 The runtime library is built as a portable class library, supporting: |
| 34 |
| 35 - .NET 4.5 |
| 36 - Windows 8 |
| 37 - Windows Phone Silverlight 8 |
| 38 - Windows Phone 8.1 |
| 39 - .NET Core (dnxcore) |
| 40 |
| 41 Building |
| 42 ======== |
| 43 |
| 44 Open the `src/Google.Protobuf.sln` solution in Visual Studio. Click "Build solut
ion" to build the solution. You should be able to run the NUnit test from Test E
xplorer (you might need to install NUnit Visual Studio add-in). |
| 45 |
| 46 Supported Visual Studio versions are VS2013 (update 4) and VS2015. On Linux, you
can also use Monodevelop 5.9 (older versions might work fine). |
| 47 |
| 48 History of C# protobufs |
| 49 ======================= |
| 50 |
| 51 This subtree was originally imported from https://github.com/jskeet/protobuf-csh
arp-port |
| 52 and represents the latest development version of C# protobufs, that will now be
developed |
| 53 and maintained by Google. All the development will be done in open, under this r
epository |
| 54 (https://github.com/google/protobuf). |
OLD | NEW |