Rename C# files to indicate generated code (#10801)
* Change C# generation script to use .pb.cs extension
* Rename generated C# files
This was performed by running generate_protos.sh and then removing the old files.
Notes:
- This does not change the conformance test generated C# code
- This does not change the compatibility C# code
- There's currently no clean-up operation in generate_protos.sh to remove old .pb.cs files (which would now be feasible)
- The changes to TestMessagesProto2.pb.cs are just due to formatting and a new Objective-C option
* Fix well-known type source files for C# Bazel build
diff --git a/csharp/generate_protos.sh b/csharp/generate_protos.sh
index cfd6082..8be4428 100755
--- a/csharp/generate_protos.sh
+++ b/csharp/generate_protos.sh
@@ -32,6 +32,7 @@
# descriptor.proto and well-known types
$PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf \
--csharp_opt=base_namespace=Google.Protobuf \
+ --csharp_opt=file_extension=.pb.cs \
src/google/protobuf/descriptor.proto \
src/google/protobuf/any.proto \
src/google/protobuf/api.proto \
@@ -52,6 +53,7 @@
$PROTOC -Isrc -Icsharp/protos \
--experimental_allow_proto3_optional \
--csharp_out=csharp/src/Google.Protobuf.Test.TestProtos \
+ --csharp_opt=file_extension=.pb.cs \
--descriptor_set_out=csharp/src/Google.Protobuf.Test/testprotos.pb \
--include_source_info \
--include_imports \
@@ -75,4 +77,5 @@
# AddressBook sample protos
$PROTOC -Iexamples -Isrc --csharp_out=csharp/src/AddressBook \
+ --csharp_opt=file_extension=.pb.cs \
examples/addressbook.proto