From 46feed023d215c0f95030265b3e0b800d2aa6ffc Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 10 Jul 2015 15:23:28 -0700 Subject: enable building nuget package --- csharp/.gitignore | 14 +------------ csharp/build_packages.bat | 13 ++++++++++++ csharp/src/ProtocolBuffers/Google.Protobuf.nuspec | 24 +++++++++++++++++++++++ csharp/src/ProtocolBuffers/ProtocolBuffers.csproj | 3 +++ 4 files changed, 41 insertions(+), 13 deletions(-) create mode 100644 csharp/build_packages.bat create mode 100644 csharp/src/ProtocolBuffers/Google.Protobuf.nuspec (limited to 'csharp') diff --git a/csharp/.gitignore b/csharp/.gitignore index d7dcef59..91baa54e 100644 --- a/csharp/.gitignore +++ b/csharp/.gitignore @@ -5,23 +5,10 @@ src/AddressBook/bin src/AddressBook/obj src/ProtocolBuffers/bin/ src/ProtocolBuffers/obj/ -src/ProtocolBuffers/objCF -src/ProtocolBuffers.Serialization/bin/ -src/ProtocolBuffers.Serialization/obj/ src/ProtocolBuffers.Test/bin/ src/ProtocolBuffers.Test/obj/ -src/ProtocolBuffersLite.Test/bin/ -src/ProtocolBuffersLite.Test/obj/ -src/ProtoBench/bin/ -src/ProtoBench/obj/ src/ProtoDump/bin/ src/ProtoDump/obj/ -src/ProtoGen/bin/ -src/ProtoGen/obj/ -src/ProtoGen.Test/bin/ -src/ProtoGen.Test/obj/ -src/ProtoMunge/bin/ -src/ProtoMunge/obj/ mono/bin mono/tmp mono/protoc @@ -36,6 +23,7 @@ lib/NUnit # *.user *.suo +*.nupkg _ReSharper.* *.sln.cache mono/TestResult.xml diff --git a/csharp/build_packages.bat b/csharp/build_packages.bat new file mode 100644 index 00000000..315c1501 --- /dev/null +++ b/csharp/build_packages.bat @@ -0,0 +1,13 @@ +@rem Builds Google.Protobuf NuGet packages + +@rem Adjust the location of nuget.exe +set NUGET=C:\nuget\nuget.exe + +@rem Build src/ProtocolBuffers.sln solution in Release configuration first. +%NUGET% pack src\ProtocolBuffers\Google.Protobuf.nuspec -Symbols || goto :error + +goto :EOF + +:error +echo Failed! +exit /b %errorlevel% diff --git a/csharp/src/ProtocolBuffers/Google.Protobuf.nuspec b/csharp/src/ProtocolBuffers/Google.Protobuf.nuspec new file mode 100644 index 00000000..49704993 --- /dev/null +++ b/csharp/src/ProtocolBuffers/Google.Protobuf.nuspec @@ -0,0 +1,24 @@ + + + + Google.Protobuf + Google Protocol Buffers C# + C# runtime library for Protocol Buffers - Google's data interchange format. + See project site for more info. + 3.0.0-experimental + Google Inc. + protobuf-packages + https://github.com/google/protobuf/blob/master/LICENSE + https://github.com/google/protobuf + false + Experimental version of C# Protocol Buffers + Copyright 2015, Google Inc. + Protocol Buffers Binary Serialization Format Google proto proto3 + + + + + + + + diff --git a/csharp/src/ProtocolBuffers/ProtocolBuffers.csproj b/csharp/src/ProtocolBuffers/ProtocolBuffers.csproj index aa4adcc0..acfade59 100644 --- a/csharp/src/ProtocolBuffers/ProtocolBuffers.csproj +++ b/csharp/src/ProtocolBuffers/ProtocolBuffers.csproj @@ -97,6 +97,9 @@ + + +