Grpc.JsonTranscoding requires manually copying annotations.proto and http.proto into projects #43376
Closed
1 task done
Labels
area-grpc
Includes: GRPC wire-up, templates
Milestone
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
When using AspNetCore.Grpc.JsonTranscoding I have to manually copy Google API annotations.proto and http.proto into my projects so that they can e.g.
import "google/api/annotations.proto";
.Describe the solution you'd like
A NuGet package that I can reference that contains the correct version of these files compatible with the version of AspNetCore.Grpc.JsonTranscoding I'm using and will make these files available in the build process so that e.g.
import "google/api/annotations.proto";
works.Additional context
An alternative solution might be to contain these files in another existing package e.g. discussed in grpc/grpc#18214. Maybe the landscape has changed and they would reconsider including in Grpc.Tools.
I've made a suggestion as to how this might be achieved in grpc/grpc-dotnet#167 (comment). Example here: https://github.com/rars/JsonTranscodingDemo
This uses GeneratePathProperty="true" on the PackageReference and then AdditionalImportDirs="$(PkgJsonTranscoding_Protos)\content" on the relevant Protobuf elements that need to import google/api/annotations.proto.
Thanks.
The text was updated successfully, but these errors were encountered: