I am using the latest version of protobuf-net with VS2008 integration. I have created 2 messages (Message1 and Message2), 1 message in 1 proto file. When I try to reference Message2 in Message1 the code generator tool gives me error "Message2" is not defined and won't generate the code file. The package for both messages is same.
It look like that because of the integration of the tool with VS2008 it expects all the messages in same .proto file to compile. Currently I have to paste an empty message with same name in Message1.proto file, like this:
message Message1 {
optional Message2 message2 = 1;
}
message Message2 {
}
And then later on remove the declaration of class Message2
from Message1.cs
.
Are there any settings that I need to do so to avoid this error, or is providing an empty declaration the only way?
Or if there isn't then I suggest that you (Marc Gravell) include a keyword like "extern" to tell the compiler that the definition of this type is available in another class