README.md
1 gRPC in 3 minutes (C#)
2 ========================
3
4 BACKGROUND
5 -------------
6 This is a different version of the helloworld example, using the old-style .csproj
7 files supported by VS2013 and VS2015 (and older versions of mono).
8 You can still use gRPC with the old-style .csproj files, but [using the new-style
9 .csproj projects](../helloworld/README.md) (supported by VS2017 and dotnet SDK) is recommended.
10
11 For this sample, we've already generated the server and client stubs from [helloworld.proto][].
12
13 Example projects depend on the [Grpc](https://www.nuget.org/packages/Grpc/), [Grpc.Tools](https://www.nuget.org/packages/Grpc.Tools/)
14 and [Google.Protobuf](https://www.nuget.org/packages/Google.Protobuf/) NuGet packages
15 which have been already added to the project for you.
16
17 PREREQUISITES
18 -------------
19
20 - Windows: .NET Framework 4.5+, Visual Studio 2013 or 2015
21 - Linux: Mono 4+, MonoDevelop 5.9+
22 - Mac OS X: Xamarin Studio 5.9+
23
24 BUILD
25 -------
26
27 - Open solution `Greeter.sln` with Visual Studio, Monodevelop (on Linux) or Xamarin Studio (on Mac OS X)
28
29 # Using Visual Studio
30
31 * Build the solution (this will automatically download NuGet dependencies)
32
33 # Using Monodevelop or Xamarin Studio
34
35 The nuget add-in available for Xamarin Studio and Monodevelop IDEs is too old to
36 download all of the nuget dependencies of gRPC.
37
38 Using these IDEs, a workaround is as follows:
39 * Obtain a nuget executable for your platform and update it with
40 `nuget update -self`.
41 * Navigate to this directory and run `nuget restore`.
42 * Now that packages have been restored into their proper package folder, build the solution from your IDE.
43
44 Try it!
45 -------
46
47 - Run the server
48
49 ```
50 > cd GreeterServer/bin/Debug
51 > GreeterServer.exe
52 ```
53
54 - Run the client
55
56 ```
57 > cd GreeterClient/bin/Debug
58 > GreeterClient.exe
59 ```
60
61 You can also run the server and client directly from the IDE.
62
63 On Linux or Mac, use `mono GreeterServer.exe` and `mono GreeterClient.exe` to run the server and client.
64
65 Tutorial
66 --------
67
68 You can find a more detailed tutorial in [gRPC Basics: C#][]
69
70 [helloworld.proto]:../../protos/helloworld.proto
71 [gRPC Basics: C#]:https://grpc.io/docs/tutorials/basic/csharp.html
72