From sample.proto
package Busy.Proto;
option optimize_for = SPEED;
message BusyRequest { required string message = 1;}
message BusyResponse {required string message = 1;}
service BusyService {rpc Send (BusyRequest) returns (BusyResponse);}
generating .cs
file, via following command, in package manager console
ProtoGen.exe sample.proto -output_directory="C:\SomeDir"
Resulting sample.cs
file
// Generated by ProtoGen, Version=2.4.1.555, Culture=neutral, PublicKeyToken=55f7125234beb589. DO NOT EDIT!
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
...
#region Services
/*
* Service generation is now disabled by default, use the following option to enable:
* option (google.protobuf.csharp_file_options).service_generator_type = GENERIC;
*/
#endregion
...
Tried
- run
ProtoGen.exe sample.proto -output_directory="C:\SomeDir" option (google.protobuf.csharp_file_options).service_generator_type = GENERIC;
in Package manager Console. Ends with error
The term 'google.protobuf.csharp_file_options' is not recognized as the name ..
- add
option service_generator_type = GENERIC;
insample.proto
. Ends with error
cannot resolve symbol
How enable Services
generation ?