Skip to content

Get C# to working #14

Closed
Closed

Description

Summary

As of now, proto-gen-csharp can not be used because google/api/annotations.proto, gogoproto/gogo.proto and protoc-gen-swagger/options/annotations.proto are not created but necessary for reflection (which can't be removed).

gogoproto/goto.proto can't be generated in C# since it's using proto2 syntax which only got added with Protocol Buffers v3.11.0 which was available starting gRPC v1.27.0. This docker currently targets 1.26.0.

Steps to Reproduce

Add the following to the proto target:

	$(PROTOC) \
		$(PROTO_INCLUDES) \
		--csharp_out=internal_access,base_namespace:${PROTO_GEN_CSHARP_DIR} \
		gogoproto/gogo.proto

What do you see now?

--csharp_out: gogo.proto: C# code generation only supports proto3 syntax
Makefile:70: recipe for target 'proto' failed
make: *** [proto] Error 1

What do you want to see instead?

The files should be generated to proto-gen-csharp.

How do you propose to implement this?

I will update the Dockerfile to use the latest set of versions.

Can you do this yourself and submit a Pull Request?

I will create a PR myself.

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions