Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
ac25e00d
Commit
ac25e00d
authored
9 years ago
by
Tim Emiola
Browse files
Options
Downloads
Plain Diff
Merge pull request #1624 from jtattermusch/csharp_readme_updates
Update readme for C#
parents
9aaa1b61
c6d43ec0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/csharp/README.md
+77
-34
77 additions, 34 deletions
src/csharp/README.md
with
77 additions
and
34 deletions
src/csharp/README.md
+
77
−
34
View file @
ac25e00d
...
...
@@ -4,74 +4,117 @@ gRPC C#
A C# implementation of gRPC.
Status
------
-----------
------
**This gRPC C# implementation is work-in-progress and is not expected to work yet.**
Ready for early adopters.
-
The implementation is a wrapper around gRPC C core library
-
Code only runs under mono currently, building gRPC C core library under Windows
is in progress.
-
It is very possible that some parts of the code will be heavily refactored or
completely rewritten.
Usage: Windows
--------------
-
Prerequisites: .NET Framework 4.5+, Visual Studio 2013 with NuGet extension installed (VS2015 should work).
INSTALLATION AND USAGE: WINDOWS
-------------------------------
-
Open Visual Studio and start a new project/solution.
-
Open Grpc.sln using Visual Studio 2013. NuGet dependencies will be restored
upon build.
-
Add NuGet package
`Grpc`
as a dependency (Project options -> Manage NuGet Packages).
That will also pull all the transitive dependencies (including the native libraries that
gRPC C# is internally using).
-
TODO: link to Helloworld example
INSTALLATION AND USAGE: LINUX & MONO
--------------
----------------------
Usage: Linux (Mono)
--------------
-
Compile and install the gRPC C# extension library (that will be used via
P/Invoke from C#).
-
Prerequisites: Mono framework, MonoDevelop 5.9 with NuGet add-in installed.
-
Install gRPC C Core using instructions in https://github.com/grpc/homebrew-grpc
-
TODO: explain using LD_LIBRARY_PATH or installation to /usr/local
-
Open MonoDevelop and start a new project/solution.
-
Add NuGet package
`Grpc`
as a dependency (Project -> Add NuGet packages).
-
TODO: link to Helloworld example
Building: Windows
-----------------
You only need to go through these steps if you are planning to develop gRPC C#.
If you are a user of gRPC C#, go to Usage section above.
-
Prerequisites for development: NET Framework 4.5+, Visual Studio 2013 (with NuGet and NUnit extensions installed).
-
The grpc_csharp_ext native library needs to be built so you can build the Grpc C# solution. You can
either build the native solution in
`vsprojects/grpc.sln`
from Visual Studio manually, or you can use
a convenience batch script that builds everything for you.
```
make grpc_csharp_ext
sudo make install_grpc_csharp_ext
buildall.bat
```
-
Prerequisites for development: Mono framework, MonoDevelop (IDE)
-
Open Grpc.sln using Visual Studio 2013. NuGet dependencies will be restored
upon build (you need to have NuGet add-in installed).
Building: Linux & Mono
----------------------
You only need to go through these steps if you are planning to develop gRPC C#.
If you are a user of gRPC C#, go to Usage section above.
-
Prerequisites for development: Mono framework, MonoDevelop 5.9 with NuGet and Nunit add-ins installed.
```
sudo apt-get install mono-devel
sudo apt-get install monodevelop monodevelop-nunit
sudo apt-get install nunit nunit-console
```
-
NuGet is used to manage project's dependencies. Prior opening Grpc.sln,
download dependencies using NuGet restore command:
You can use older versions of MonoDevelop, but then you might need to restore
NuGet dependencies manually (by
`nuget restore`
), because older versions of MonoDevelop
don't support NuGet add-in.
-
Compile and install the gRPC C# extension library (that will be used via
P/Invoke from C#).
```
# Import needed certicates into Mono certificate store:
mozroots --import --sync
# Download NuGet.exe http://nuget.codeplex.com/releases/
# Restore the nuget packages with Grpc C# dependencies
mono ~/Downloads/NuGet.exe restore Grpc.sln
make grpc_csharp_ext
sudo make install_grpc_csharp_ext
```
-
Use MonoDevelop to open the solution Grpc.sln (you can also run unit tests
from there).
-
Use MonoDevelop to open the solution Grpc.sln
-
Build the solution & run all the tests from test view.
Tests
-----
-
After building the solution with MonoDevelop, you can use
nunit-console to run the unit tests (currently only running one by
one will make them pass.
gRPC C# is using NUnit as the testing framework.
Under Visual Studio, make sure NUnit test adapter is installed (under "Extensions and Updates").
Then you should be able to run all the tests using Test Explorer.
Under Monodevelop, make sure you installed "NUnit support" in Add-in manager.
Then you should be able to run all the test from the Test View.
After building the solution, you can also run the tests from command line
using nunit-console tool.
```
# from Grpc.Core.Test/bin/Debug directory
nunit-console Grpc.Core.Tests.dll
```
C
ONTENTS
C
ontents
--------
-
ext:
The extension library that wraps C API to be more digestible by C#.
-
Grpc.Auth:
gRPC OAuth2 support.
-
Grpc.Core:
The main gRPC C# library.
-
Grpc.Examples:
API examples for math.proto
-
Grpc.Examples.MathClient:
An example client that sends some requests to math server.
-
Grpc.Examples.MathServer:
An example client that sends some requests to math server.
-
Grpc.IntegrationTesting:
C
lient for c
ross-language gRPC implementation testing (interop testing).
Cross-language gRPC implementation testing (interop testing).
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment