Trying to use a FileDescriptorSet in my own proto3 message definition with 
C# 3.0.0-alpha4 generated code, but running into compilation issues.

The code generates just fine using protoc.exe, but the generated code won't 
compile due to a missing reference to "global
::Google.Protobuf.FileDescriptorSet".

Attempting to generate code from the protobuf definition fails, because the 
Descriptor.proto file uses proto2 syntax and hence is not supported by the 
C# code generator.

A C# object for FileDescriptorSet does not appear to be in Google.Protobuf 
assembly.  Nor could I figure out how to modify the generated code to 
compile properly.  Attempting to manually edit the generated code to use 

Google.Protobuf.Collections.RepeatedField< 
Google.Protobuf.Reflection.FileDescriptor > failed with a "no conversion to 
IMessage<>", or something similar.


Please, what is the right way to use a FileDescriptorSet in my own proto?

Sample Code

syntax = "proto3";

import "google/protobuf/descriptor.proto"; // for FileDescriptorSet 

package my.package;
option csharp_namespace = "My.Package"; 


message MyMetadata {
    google.protobuf.FileDescriptorSet proto_files = 1;
    string myOtherData = 2;
    }
 

 

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to