Skip to content
This repository was archived by the owner on Apr 9, 2021. It is now read-only.

Commit 7da66ae

Browse files
author
kkm
committed
Experimental: @jtattermusch's subsection suggestion
1 parent b810eb2 commit 7da66ae

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

_posts/2018-11-16-grpc-dotnet-build.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ library, shared by client and server projects in the [C# `Helloworld` example
3535
directory
3636
](https://github.com/grpc/grpc/tree/master/examples/csharp/Helloworld/Greeter).
3737

38-
Start by creating a new library project.
38+
### Create a new project
39+
40+
Let's start by creating a new library project.
3941

4042
```
4143
~/work$ dotnet new classlib -o MyGreeter
@@ -76,6 +78,8 @@ info : PackageReference for package 'Grpc.Tools' version '1.17.0' added to file
7678
info : PackageReference for package 'Google.Protobuf' version '3.6.1' added to file '/home/kkm/work/MyGreeter/MyGreeter.csproj'.
7779
```
7880

81+
### Add `.proto` files to the project
82+
7983
**Next comes an important part.** First of all, by default, a `.csproj` project
8084
file automatically finds all `.cs` files in its directory, although
8185
[Microsoft now recommends suppressing this globbing
@@ -113,6 +117,8 @@ reference. Your resulting project file should now look like this:
113117
</Project>
114118
```
115119

120+
### Build it!
121+
116122
At this point you can build the project with the `dotnet build` command to
117123
compile the `.proto` file and the library assembly. For this walkthrough, we'll
118124
add a logging switch `-v:n` to the command, so we can see that the command to
@@ -153,6 +159,8 @@ project building a .NET library, after all. This is done in our [RouteGuide
153159
](https://github.com/grpc/grpc/tree/master/examples/csharp/RouteGuide/RouteGuide)
154160
example.
155161

162+
### Where are the generated files?
163+
156164
You may wonder where the proto compiler and gRPC plugin output C# files are. By
157165
default, they are placed in the same directory as other generated files, such
158166
as objects (termed the "intermediate output" directory in the .NET build

0 commit comments

Comments
 (0)