Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Protos.proto in nuget again - or how to reference actor.PID in proto message? #1956

Open
nibdev opened this issue Mar 16, 2023 · 2 comments

Comments

@nibdev
Copy link

nibdev commented Mar 16, 2023

In the current version of the nuget the Protos.proto file is not included anymore.
If one wants to send a PID over a proto message it's not possible (or i dont know how??).
In the chat example the Protos.proto file from the .git source code is referenced, but this is not possible when using the nuget.

Is there any easy way?

Currently i define my own PID class (for messages) and a C# extensions method to convert between these two

@rogeralsing
Copy link
Contributor

If anyone want to give this a go, feel free to grab this task.
If you can make it so that the protos.proto file in the main proto.actor project is included in the nuget reference, as a file which gets added to the project referencing proto.actor, this would be fantastic.

I know it is possible as others include readme files and similar things.
I just don't know how to myself

@mseada94
Copy link

mseada94 commented May 6, 2023

I make a sample for including the proto files to nuget package and import it in the chat example instead of local reference
c4b9b49

It's not auto-generated, require adding GeneratePathProperty="true" property to nuget reference and adding the proto path to imports AdditionalImportDirs=".; $(PkgProto_Actor)\Protos"

I suggest collecting all proto files in single nuget without using Protobuf code generation and reuse this package in different packages.

so user could just import single package instead of the need for multiple AdditionalImportDirs

@rogeralsing If you find this is a good solution, I could start working on it.

Reference: https://www.asystad.net/sharing-message-types-between-grpc-services-in-net/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants