diff --git a/src/protobuf-net/build.cmd b/src/protobuf-net/build.cmd index b71a706ef..3ba4a0ed2 100644 --- a/src/protobuf-net/build.cmd +++ b/src/protobuf-net/build.cmd @@ -4,5 +4,6 @@ git checkout a978575b9e8bc281f7341237cace35220ef0ff35 git apply --ignore-space-change --ignore-whitespace ..\internal_only.patch cd src\protogen dotnet build -c release -copy bin\release\net40\*.exe ..\..\windows\bin\ -copy bin\release\net40\*.dll ..\..\windows\bin\ +copy /y bin\release\net40\*.exe ..\..\..\..\..\windows\bin\ +copy /y bin\release\net40\*.dll ..\..\..\..\..\windows\bin\ +:: git diff > > internal_only.patch diff --git a/src/protobuf-net/internal_only.patch b/src/protobuf-net/internal_only.patch index c47cef4ff..57af217c4 100644 --- a/src/protobuf-net/internal_only.patch +++ b/src/protobuf-net/internal_only.patch @@ -1,8 +1,24 @@ diff --git a/src/protobuf-net.Reflection/CSharpCodeGenerator.cs b/src/protobuf-net.Reflection/CSharpCodeGenerator.cs -index edd6f1c..24b117e 100644 +index edd6f1c..8be0237 100644 --- a/src/protobuf-net.Reflection/CSharpCodeGenerator.cs +++ b/src/protobuf-net.Reflection/CSharpCodeGenerator.cs -@@ -204,7 +204,7 @@ namespace ProtoBuf.Reflection +@@ -175,14 +175,7 @@ namespace ProtoBuf.Reflection + /// + protected override void WriteEnumValue(GeneratorContext ctx, EnumValueDescriptorProto obj, ref object state) + { +- var name = ctx.NameNormalizer.GetName(obj); +- if (name != obj.Name) +- { +- var tw = ctx.Write($@"[global::ProtoBuf.ProtoEnum("); +- tw.Write($@"Name = @""{obj.Name}"""); +- tw.WriteLine(")]"); +- } +- ++ var name = obj.Name; + WriteOptions(ctx, obj.Options); + ctx.WriteLine($"{Escape(name)} = {obj.Number},"); + } +@@ -204,7 +197,7 @@ namespace ProtoBuf.Reflection if (name != obj.Name) tw.Write($@"Name = @""{obj.Name}"""); tw.WriteLine(")]"); WriteOptions(ctx, obj.Options); @@ -11,3 +27,25 @@ index edd6f1c..24b117e 100644 if (obj.ExtensionRanges.Count != 0) tw.Write(" : global::ProtoBuf.IExtensible"); tw.WriteLine(); ctx.WriteLine("{").Indent(); +@@ -332,7 +325,7 @@ namespace ProtoBuf.Reflection + + if (found != null) + { +- defaultValue = ctx.NameNormalizer.GetName(found); ++ defaultValue = found.Name; + } + if (!string.IsNullOrWhiteSpace(defaultValue)) + { +diff --git a/src/protobuf-net.Reflection/CodeGenerator.cs b/src/protobuf-net.Reflection/CodeGenerator.cs +index 2d3ede7..9d88d2f 100644 +--- a/src/protobuf-net.Reflection/CodeGenerator.cs ++++ b/src/protobuf-net.Reflection/CodeGenerator.cs +@@ -134,7 +134,7 @@ namespace ProtoBuf.Reflection + string generated; + using (var buffer = new StringWriter()) + { +- var ctx = new GeneratorContext(file, normalizer ?? NameNormalizer.Default, buffer, Indent); ++ var ctx = new GeneratorContext(file, normalizer ?? NameNormalizer.Null, buffer, Indent); + + ctx.BuildTypeIndex(); // populates for TryFind + WriteFile(ctx, file); diff --git a/windows/bin/protobuf-net.Reflection.dll b/windows/bin/protobuf-net.Reflection.dll index 4b66cbcc6..e81623457 100644 Binary files a/windows/bin/protobuf-net.Reflection.dll and b/windows/bin/protobuf-net.Reflection.dll differ