• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..17-Jul-2020-

Grpc/H17-Jul-2020-3125

Grpc.Auth/H17-Jul-2020-247126

Grpc.Core/H17-Jul-2020-12,8618,284

Grpc.Core.Api/H17-Jul-2020-5,5672,399

Grpc.Core.NativeDebug/H17-Jul-2020-4539

Grpc.Core.Testing/H17-Jul-2020-269162

Grpc.Core.Tests/H17-Jul-2020-7,3425,330

Grpc.Examples/H17-Jul-2020-1,369992

Grpc.Examples.MathClient/H17-Jul-2020-10356

Grpc.Examples.MathServer/H17-Jul-2020-10559

Grpc.Examples.Tests/H17-Jul-2020-435287

Grpc.HealthCheck/H17-Jul-2020-964614

Grpc.HealthCheck.Tests/H17-Jul-2020-585383

Grpc.IntegrationTesting/H17-Jul-2020-19,89115,478

Grpc.IntegrationTesting.Client/H17-Jul-2020-9146

Grpc.IntegrationTesting.QpsWorker/H17-Jul-2020-9247

Grpc.IntegrationTesting.Server/H17-Jul-2020-9045

Grpc.IntegrationTesting.StressClient/H17-Jul-2020-9045

Grpc.IntegrationTesting.XdsClient/H17-Jul-2020-9146

Grpc.Microbenchmarks/H17-Jul-2020-915593

Grpc.Reflection/H17-Jul-2020-2,2051,721

Grpc.Reflection.Tests/H17-Jul-2020-295191

Grpc.Tools/H17-Jul-2020-2,1571,322

Grpc.Tools.Tests/H17-Jul-2020-1,070782

build/H17-Jul-2020-86

doc/H03-May-2022-

docfx/H17-Jul-2020-11476

experimental/H17-Jul-2020-15776

ext/H17-Jul-2020-1,3061,013

keys/H03-May-2022-98

unitypackage/H17-Jul-2020-2,3732,291

.editorconfigH A D17-Jul-20201.3 KiB3230

.gitignoreH A D17-Jul-2020176 1816

BUILD-INTEGRATION.mdH A D17-Jul-202017.7 KiB378300

Directory.Build.propsH A D17-Jul-202068 33

Grpc.slnH A D17-Jul-202011.6 KiB152150

README.mdH A D17-Jul-20205.5 KiB13085

Settings.StyleCopH A D17-Jul-202019.2 KiB509509

build_packages_dotnetcli.batH A D17-Jul-20202.6 KiB5845

build_unitypackage.batH A D17-Jul-20205.6 KiB8669

expand_dev_version.shH A D17-Jul-2020948 264

generate_proto_csharp.shH A D17-Jul-20202.2 KiB4919

install_dotnet_sdk.ps1H A D17-Jul-2020621 178

tests.jsonH A D17-Jul-20203.8 KiB9190

README.md

1[![Nuget](https://img.shields.io/nuget/v/Grpc.svg)](http://www.nuget.org/packages/Grpc/)
2gRPC C#
3=======
4
5A C# implementation of gRPC based on the native gRPC Core library.
6
7There are currently two official implementations of gRPC for C#
8
9- The original gRPC C# implementation based on the native gRPC Core library (the source code lives in this directory)
10- The new "gRPC for .NET" implementation written in pure C# and based on the newly released .NET Core 3 (source code available at https://github.com/grpc/grpc-dotnet)
11
12The implementations are meant to coexist side-by-side and each has its own advantages in terms of available features, integrations, supported platforms, maturity level and performance.
13They share the same API for invoking and handling RPCs, thus limiting the lock-in and enabling users to choose the implementation that satisfies their needs the best
14(and perhaps adjust their choice over time without needing to do too much refactoring).
15
16The following documentation is for the original gRPC C# implementation only (the `Grpc.Core` nuget package).
17
18SUPPORTED PLATFORMS
19------------------
20
21- [.NET Core](https://dotnet.github.io/) on Linux, Windows and Mac OS X
22- .NET Framework 4.5+ (Windows)
23- Mono 4+ on Linux, Windows and Mac OS X
24
25PREREQUISITES
26--------------
27
28When using gRPC C# under .NET Core you only need to [install .NET Core](https://www.microsoft.com/net/core).
29
30In addition to that, you can also use gRPC C# with these runtimes / IDEs
31- Windows: .NET Framework 4.5+, Visual Studio 2013 or newer, Visual Studio Code
32- Linux: Mono 4+, Visual Studio Code
33- Mac OS X: Mono 4+, Visual Studio Code, Visual Studio for Mac
34
35HOW TO USE
36--------------
37
38**Windows, Linux, Mac OS X**
39
40- Open Visual Studio and start a new project/solution (alternatively, you can create a new project from command line with `dotnet` SDK)
41
42- Add the [Grpc](https://www.nuget.org/packages/Grpc/) NuGet package as a dependency (Project options -> Manage NuGet Packages).
43
44- To be able to generate code from Protocol Buffer (`.proto`) file definitions, add the [Grpc.Tools](https://www.nuget.org/packages/Grpc.Tools/) NuGet package which provides [code generation integrated into your build](BUILD-INTEGRATION.md).
45
46**Xamarin.Android and Xamarin.iOS (Experimental only)**
47
48See [Experimentally supported platforms](experimental) for instructions.
49
50**Unity (Experimental only)**
51
52See [Experimentally supported platforms](experimental) for instructions.
53
54NUGET DEVELOPMENT FEED (NIGHTLY BUILDS)
55--------------
56
57In production, you should use officially released stable packages available on http://nuget.org, but if you want to test the newest upstream bug fixes and features early, you can use the development nuget feed where new nuget builds are uploaded nightly.
58
59Feed URL (NuGet v2): https://grpc.jfrog.io/grpc/api/nuget/grpc-nuget-dev
60
61Feed URL (NuGet v3): https://grpc.jfrog.io/grpc/api/nuget/v3/grpc-nuget-dev
62
63The same development nuget packages and packages for other languages can also be found at https://packages.grpc.io/
64
65BUILD FROM SOURCE
66-----------------
67
68You only need to go through these steps if you are planning to develop gRPC C#.
69If you are a user of gRPC C#, go to Usage section above.
70
71**Prerequisites for contributors**
72
73- [dotnet SDK](https://www.microsoft.com/net/core)
74- [Mono 4+](https://www.mono-project.com/) (only needed for Linux and MacOS)
75- Prerequisites mentioned in [BUILDING.md](../../BUILDING.md#pre-requisites)
76  to be able to compile the native code.
77
78**Windows, Linux or Mac OS X**
79
80- The easiest way to build is using the `run_tests.py` script that will take care of building the `grpc_csharp_ext` native library.
81
82  ```
83  # NOTE: make sure all necessary git submodules with dependencies
84  # are available by running "git submodule update --init"
85
86  # from the gRPC repository root
87  $ python tools/run_tests/run_tests.py -l csharp -c dbg --build_only
88  ```
89
90- Use Visual Studio 2017 (on Windows) to open the solution `Grpc.sln` or use Visual Studio Code with C# extension (on Linux and Mac). gRPC C# code has been migrated to
91  dotnet SDK `.csproj` projects that are much simpler to maintain, but are not yet supported by Xamarin Studio or Monodevelop (the NuGet packages still
92  support both `net45` and `netstandard` and can be used in all IDEs).
93
94RUNNING TESTS
95-------------
96
97gRPC C# is using NUnit as the testing framework.
98
99Under Visual Studio, make sure NUnit test adapter is installed (under "Extensions and Updates").
100Then you should be able to run all the tests using Test Explorer.
101
102gRPC team uses a Python script to facilitate running tests for
103different languages.
104
105```
106# from the gRPC repository root
107$ python tools/run_tests/run_tests.py -l csharp -c dbg
108```
109
110DOCUMENTATION
111-------------
112- [.NET Build Integration](BUILD-INTEGRATION.md)
113- [API Reference][]
114- [Helloworld Example][]
115- [RouteGuide Tutorial][]
116
117PERFORMANCE
118-----------
119
120For best gRPC C# performance, use [.NET Core](https://dotnet.github.io/) and the Server GC mode `"System.GC.Server": true` for your applications.
121
122THE NATIVE DEPENDENCY
123---------------
124
125Internally, gRPC C# uses a native library written in C (gRPC C core) and invokes its functionality via P/Invoke. The fact that a native library is used should be fully transparent to the users and just installing the `Grpc.Core` NuGet package is the only step needed to use gRPC C# on all supported platforms.
126
127[API Reference]: https://grpc.io/grpc/csharp/api/Grpc.Core.html
128[Helloworld Example]: ../../examples/csharp/Helloworld
129[RouteGuide Tutorial]: https://grpc.io/docs/tutorials/basic/csharp.html
130