diff --git a/Makefile.am b/Makefile.am index 755355f421c7..8fd66c79ee2b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -127,21 +127,22 @@ csharp_EXTRA_DIST= \ csharp/src/Google.Protobuf.Test/SampleMessages.cs \ csharp/src/Google.Protobuf.Test/SampleNaNs.cs \ csharp/src/Google.Protobuf.Test/TestCornerCases.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/ForeignMessagePartial.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/OldExtensions1.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/OldExtensions2.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportProto3.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublic.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestImport.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs \ - csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/Google.Protobuf.Test.TestProtos.csproj \ + csharp/src/Google.Protobuf.Test.TestProtos/ForeignMessagePartial.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/MapUnittestProto3.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/OldExtensions1.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/OldExtensions2.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto2.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto3.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestCustomOptionsProto3.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestImportProto3.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestImportPublicProto3.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestImportPublic.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestImport.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssues.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestProto3.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/UnittestWellKnownTypes.cs \ + csharp/src/Google.Protobuf.Test.TestProtos/Unittest.cs \ csharp/src/Google.Protobuf.Test/WellKnownTypes/AnyTest.cs \ csharp/src/Google.Protobuf.Test/WellKnownTypes/DurationTest.cs \ csharp/src/Google.Protobuf.Test/WellKnownTypes/FieldMaskTest.cs \ diff --git a/csharp/generate_protos.sh b/csharp/generate_protos.sh index 1083d671c1d6..66d87c02f711 100755 --- a/csharp/generate_protos.sh +++ b/csharp/generate_protos.sh @@ -45,7 +45,7 @@ $PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf \ # and old_extensions2.proto, which are generated with an older version # of protoc. $PROTOC -Isrc -Icsharp/protos \ - --csharp_out=csharp/src/Google.Protobuf.Test/TestProtos \ + --csharp_out=csharp/src/Google.Protobuf.Test.TestProtos \ --descriptor_set_out=csharp/src/Google.Protobuf.Test/testprotos.pb \ --include_source_info \ --include_imports \ diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/ForeignMessagePartial.cs b/csharp/src/Google.Protobuf.Test.TestProtos/ForeignMessagePartial.cs similarity index 96% rename from csharp/src/Google.Protobuf.Test/TestProtos/ForeignMessagePartial.cs rename to csharp/src/Google.Protobuf.Test.TestProtos/ForeignMessagePartial.cs index 5663a69902e5..909bcea96e59 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/ForeignMessagePartial.cs +++ b/csharp/src/Google.Protobuf.Test.TestProtos/ForeignMessagePartial.cs @@ -39,7 +39,7 @@ public partial class ForeignMessage : ICustomDiagnosticMessage { public string ToDiagnosticString() { - return $"{{ \"c\": {C}, \"@cInHex\": \"{C:x}\" }}"; + return string.Format("{{ \"c\": {0}, \"@cInHex\": \"{0:x}\" }}", C); } } } diff --git a/csharp/src/Google.Protobuf.Test.TestProtos/Google.Protobuf.Test.TestProtos.csproj b/csharp/src/Google.Protobuf.Test.TestProtos/Google.Protobuf.Test.TestProtos.csproj new file mode 100644 index 000000000000..5b705804aa27 --- /dev/null +++ b/csharp/src/Google.Protobuf.Test.TestProtos/Google.Protobuf.Test.TestProtos.csproj @@ -0,0 +1,26 @@ + + + + + net45;netstandard1.0;netstandard2.0 + 3.0 + ../../keys/Google.Protobuf.snk + true + true + False + + + + + + + + + + + + diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs b/csharp/src/Google.Protobuf.Test.TestProtos/MapUnittestProto3.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/MapUnittestProto3.cs rename to csharp/src/Google.Protobuf.Test.TestProtos/MapUnittestProto3.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/OldExtensions1.cs b/csharp/src/Google.Protobuf.Test.TestProtos/OldExtensions1.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/OldExtensions1.cs rename to csharp/src/Google.Protobuf.Test.TestProtos/OldExtensions1.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/OldExtensions2.cs b/csharp/src/Google.Protobuf.Test.TestProtos/OldExtensions2.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/OldExtensions2.cs rename to csharp/src/Google.Protobuf.Test.TestProtos/OldExtensions2.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs b/csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto2.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto2.cs rename to csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto2.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs b/csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto3.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/TestMessagesProto3.cs rename to csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto3.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs b/csharp/src/Google.Protobuf.Test.TestProtos/Unittest.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/Unittest.cs rename to csharp/src/Google.Protobuf.Test.TestProtos/Unittest.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs b/csharp/src/Google.Protobuf.Test.TestProtos/UnittestCustomOptionsProto3.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/UnittestCustomOptionsProto3.cs rename to csharp/src/Google.Protobuf.Test.TestProtos/UnittestCustomOptionsProto3.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImport.cs b/csharp/src/Google.Protobuf.Test.TestProtos/UnittestImport.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/UnittestImport.cs rename to csharp/src/Google.Protobuf.Test.TestProtos/UnittestImport.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportProto3.cs b/csharp/src/Google.Protobuf.Test.TestProtos/UnittestImportProto3.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportProto3.cs rename to csharp/src/Google.Protobuf.Test.TestProtos/UnittestImportProto3.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublic.cs b/csharp/src/Google.Protobuf.Test.TestProtos/UnittestImportPublic.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublic.cs rename to csharp/src/Google.Protobuf.Test.TestProtos/UnittestImportPublic.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs b/csharp/src/Google.Protobuf.Test.TestProtos/UnittestImportPublicProto3.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/UnittestImportPublicProto3.cs rename to csharp/src/Google.Protobuf.Test.TestProtos/UnittestImportPublicProto3.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs b/csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssues.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/UnittestIssues.cs rename to csharp/src/Google.Protobuf.Test.TestProtos/UnittestIssues.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs b/csharp/src/Google.Protobuf.Test.TestProtos/UnittestProto3.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs rename to csharp/src/Google.Protobuf.Test.TestProtos/UnittestProto3.cs diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs b/csharp/src/Google.Protobuf.Test.TestProtos/UnittestWellKnownTypes.cs similarity index 100% rename from csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs rename to csharp/src/Google.Protobuf.Test.TestProtos/UnittestWellKnownTypes.cs diff --git a/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj b/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj index 7fff91283b90..1a7953d6b786 100644 --- a/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj +++ b/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj @@ -10,6 +10,7 @@ + diff --git a/csharp/src/Google.Protobuf.sln b/csharp/src/Google.Protobuf.sln index 262a43b78f3b..b571e53c12eb 100644 --- a/csharp/src/Google.Protobuf.sln +++ b/csharp/src/Google.Protobuf.sln @@ -1,4 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26114.2 MinimumVisualStudioVersion = 10.0.40219.1 @@ -14,6 +14,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Google.Protobuf.JsonDump", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Protobuf.Benchmarks", "Google.Protobuf.Benchmarks\Google.Protobuf.Benchmarks.csproj", "{D25E4804-4DEA-45AB-9F8C-BA4DBD8E5A07}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Protobuf.Test.TestProtos", "Google.Protobuf.Test.TestProtos\Google.Protobuf.Test.TestProtos.csproj", "{ADF24BEB-A318-4530-8448-356B72B820EA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -44,6 +46,10 @@ Global {D25E4804-4DEA-45AB-9F8C-BA4DBD8E5A07}.Debug|Any CPU.Build.0 = Debug|Any CPU {D25E4804-4DEA-45AB-9F8C-BA4DBD8E5A07}.Release|Any CPU.ActiveCfg = Release|Any CPU {D25E4804-4DEA-45AB-9F8C-BA4DBD8E5A07}.Release|Any CPU.Build.0 = Release|Any CPU + {ADF24BEB-A318-4530-8448-356B72B820EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ADF24BEB-A318-4530-8448-356B72B820EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ADF24BEB-A318-4530-8448-356B72B820EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ADF24BEB-A318-4530-8448-356B72B820EA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE