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

Commit 0c47465

Browse files
author
kkm
committed
Address review comments round 2
1 parent 7da66ae commit 0c47465

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ to introduce integrated compilation of Protocol Buffer and gRPC service
1616
`.proto` files in .NET C# projects starting with the version 1.17 of the
1717
Grpc.Tools NuGet package, now available from Nuget.org.
1818

19-
You no longer need separate scripts to generate code from `.proto` files: The
20-
.NET build magic handles this for you. The integrated tools locate the proto
21-
compiler and gRPC plugin, standard Protocol Buffer imports, and track
19+
You no longer need to use hand-written scripts to generate code from `.proto`
20+
files: The .NET build magic handles this for you. The integrated tools locate
21+
the proto compiler and gRPC plugin, standard Protocol Buffer imports, and track
2222
dependencies before invoking the code generators, so that the generated C#
2323
source files are never out of date, at the same time keeping regeneration to
2424
the minimum required. In essence, `.proto` files are treated as first-class
@@ -109,9 +109,14 @@ reference. Your resulting project file should now look like this:
109109
<ItemGroup>
110110
<PackageReference Include="Google.Protobuf" Version="3.6.1" />
111111
<PackageReference Include="Grpc" Version="1.17.0" />
112-
<!-- Add attribute as shown below. -->
112+
113+
<!-- The Grpc.Tools package generates C# sources from .proto files during
114+
project build, but is not needed by projects using the built library.
115+
It's IMPORTANT to add the 'PrivateAssets="All"' to this reference: -->
113116
<PackageReference Include="Grpc.Tools" Version="1.17.0" PrivateAssets="All" />
114-
<Protobuf Include="helloworld.proto" /> <!-- Add this entire line. -->
117+
118+
<!-- Explicitly include our helloworld.proto file by adding this line: -->
119+
<Protobuf Include="helloworld.proto" />
115120
</ItemGroup>
116121

117122
</Project>

0 commit comments

Comments
 (0)