I just started learning gRPC and I got an issue with proto files, as I understand these files define the model of incoming-outgoing data.
On the server side everything is OK. The server compiles and runs fine, but the client side does not recognize proto files from the server. Using Visual Studio 2019, it suggest to add the whole server as a reference.
At this point I believed I went too far. Looking for a solution, I read that I need to add it as a Service Reference, but Visual Studio 2019 only offers WCF and Azure service. Do I need to copy paste proto files from the server to the client since looking on other "tutorials" I noticed that proto files copy pasted to client, client and server are .NET Core 3.0 and ASP.NET Core 3.0.
You can share your Proto.io project using Share links, that is, links that others can access. You can choose to share your prototype as: Live Version: Share a live version of your prototype. Any changes made to your prototype will be visible to the people who access this Share link.
No, a server cannot invoke calls on the client. gRPC works with HTTP, and HTTP has not had such semantics in the past.
Go to your client app
In a popup window specify path to .proto file and choose type of class to be generated - "Client". Now you will have one .proto file for two projects.
This is instruction for Visual Studio 2019.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With