Technically, there is no such file "google/protobuf/csharp_options.proto".
The canonical directory "google/protobuf" should contain only files from
the official Google protobuf implementation. But it seems the C#
implementation you're using has chosen to put their own file under this
path. I guess that's not a huge deal -- particularly because you're
probably using Jon Skeet's implementation and he does technically work for
Google -- but I would have asked him to use a different path.
Anyway, including the C# options in the Java build should not be a problem.
It just requires that you generate Java classes for csharp_options.proto
and include those in your application. It's mildly annoying, and we've
considered doing something about it, but for the moment this is the only
option, as we have no concept of optional imports or compile-time-only
On Mon, Nov 8, 2010 at 10:51 AM, jebrick <jebr...@gmail.com> wrote:
> I am running into an issue with generating protobuf code for c# and
> java from the same protos. The protos have an import for the dotnet
> side (import "google/protobuf/csharp_options.proto";) which causes the
> runtime java code to fail when it tries to generate the Descriptors.
> Are their any build options to exclude that import for the java_out
> calls vs a dotnet build?
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To post to this group, send email to proto...@googlegroups.com.
> To unsubscribe from this group, send email to
> For more options, visit this group at
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at