You need to locate and import this file locally:
https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto

That should do it!

On Tue, Jan 5, 2021 at 3:00 PM Tom Hintz <tdhi...@gmail.com> wrote:

> New user question... Using Visual Studio 2019, C# project, I added NuGet
> packages Google.Protobuf and Google.Protobuf.Tools and formed a simple. I
> can't use Empty or Timestamp data types.  How do I reference these
> definitions?  Example .proto file, below. protoc.exe version 3.14.0
> produces the error:
>
> Myservice.proto:7:xx: "google.protobuf.Empty" is not defined.
>
> syntax = "proto3";
> package Myservice;
> option csharp_namespace = "Google.Protobuf.WellKnownTypes";
>
> // Interface exported by the server.
> service  Myservice   {
>     rpc Mymethod(Msg) returns (google.protobuf.Empty);
> }
>
> message Msg { }
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/protobuf/a2569bda-59d4-4dc8-9fc6-543cc614eaa4n%40googlegroups.com
> <https://groups.google.com/d/msgid/protobuf/a2569bda-59d4-4dc8-9fc6-543cc614eaa4n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/CAD7-yfsPEMepZGRxi0xohmxAju1by91sG%2BmwTsf_Y3vt30YgDw%40mail.gmail.com.

Reply via email to