2

I'm using Visual Studio 2022 on a project that using gRPC that contains .proto file.

When I open or build the project, the line ending mode of proto-generated classes are set to LF. Currently, these files are tracked in code base with CRLF mode.

How can I overwrite the default setting?

Le Vu
  • 407
  • 3
  • 12
  • For the C# messages/enums, assuming VS is using the standard `protoc` generator, I don't believe there's any way of changing this. (See https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/compiler/csharp/csharp_enum_field.cc for example - I don't believe the `Printer` class does any LF=>CRLF substitution.) It's just possible that VS has an option to post-process it, of course. – Jon Skeet Nov 25 '21 at 06:53

0 Answers0