You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate the c# code and compile via Grpc.Protobuf.Tools.3.9.1
Code generated in invalid as it generates extension methods in the descriptor that access the FieldOptions, which it can't as FieldOptions is internal so you get the following error trying to compile:
Error CS0122 'FieldOptions' is inaccessible due to its protection level
Including the descriptor.proto in the build gets round the compilation issue (as it's then in the same assembly) - however if you do that you get another error trying to access the descriptor:
Message: System.TypeInitializationException : The type initializer for 'TestAnnotationsReflection' threw an exception.
---- System.ArgumentException : An item with the same key has already been added. Key: Google.Protobuf.ObjectIntPair`1[System.Type]
Anything else we should know about your project / environment
Using the Grpc.Tools 1.22.0 protoc compiler gets round this particular problem, but then you get hit by this issue 6509
The text was updated successfully, but these errors were encountered:
Version: 3.9.1
Language: C#
Linux & Windows
Protoc: Grpc.Protobuf.Tools.3.9.1
What did you do?
Steps to reproduce the behavior:
Generate the c# code and compile via Grpc.Protobuf.Tools.3.9.1
Code generated in invalid as it generates extension methods in the descriptor that access the FieldOptions, which it can't as FieldOptions is
internal
so you get the following error trying to compile:descriptor.proto
in the build gets round the compilation issue (as it's then in the same assembly) - however if you do that you get another error trying to access the descriptor:Anything else we should know about your project / environment
Using the Grpc.Tools 1.22.0 protoc compiler gets round this particular problem, but then you get hit by this issue 6509
The text was updated successfully, but these errors were encountered: