aboutsummaryrefslogtreecommitdiffhomepage
path: root/vsprojects/nuget_package
diff options
context:
space:
mode:
Diffstat (limited to 'vsprojects/nuget_package')
-rw-r--r--vsprojects/nuget_package/.gitignore3
-rw-r--r--vsprojects/nuget_package/README.md20
-rw-r--r--vsprojects/nuget_package/buildall.bat46
-rw-r--r--vsprojects/nuget_package/grpc.native.csharp_ext.nuspec30
-rw-r--r--vsprojects/nuget_package/grpc.native.csharp_ext.props12
-rw-r--r--vsprojects/nuget_package/grpc.native.csharp_ext.targets14
6 files changed, 125 insertions, 0 deletions
diff --git a/vsprojects/nuget_package/.gitignore b/vsprojects/nuget_package/.gitignore
new file mode 100644
index 0000000000..ae830da1b2
--- /dev/null
+++ b/vsprojects/nuget_package/.gitignore
@@ -0,0 +1,3 @@
+/tmp
+/output
+*.nupkg
diff --git a/vsprojects/nuget_package/README.md b/vsprojects/nuget_package/README.md
new file mode 100644
index 0000000000..80d84ce8c8
--- /dev/null
+++ b/vsprojects/nuget_package/README.md
@@ -0,0 +1,20 @@
+gRPC Native Nuget package
+=========================
+
+Prerequisites
+-------------
+Multiple versions of VS installed to be able to build all the targets:
+* Visual Studio 2013
+* Visual Studio 2010 (you might need SP1 to prevent LNK1123 error)
+
+NuGet binary
+
+Building the package
+--------------------
+
+Build all flavors of gRPC C# extension and package them as a NuGet package.
+```
+buildall.bat
+
+nuget pack grpc.native.csharp_ext
+``` \ No newline at end of file
diff --git a/vsprojects/nuget_package/buildall.bat b/vsprojects/nuget_package/buildall.bat
new file mode 100644
index 0000000000..837eef0f6a
--- /dev/null
+++ b/vsprojects/nuget_package/buildall.bat
@@ -0,0 +1,46 @@
+@echo off
+setlocal
+
+REM setlocal
+REM call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
+REM call :build x64 Release v120 || goto :eof
+REM call :build x64 Debug v120 || goto :eof
+REM endlocal
+
+setlocal
+call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
+call :build Win32 Release v120 || goto :eof
+call :build Win32 Debug v120 || goto :eof
+endlocal
+
+REM setlocal
+REM call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" amd64
+REM call :build x64 Release v110 || goto :eof
+REM call :build x64 Debug v110 || goto :eof
+REM endlocal
+
+REM setlocal
+REM call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
+REM call :build Win32 Release v110 || goto :eof
+REM call :build Win32 Debug v110 || goto :eof
+REM endlocal
+
+REM setlocal
+REM call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64
+REM call :build x64 Release v100 || goto :eof
+REM call :build x64 Debug v100 || goto :eof
+REM endlocal
+
+setlocal
+call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
+call :build Win32 Release v100 || goto :eof
+call :build Win32 Debug v100 || goto :eof
+endlocal
+
+goto :eof
+
+:build
+msbuild /t:grpc_csharp_ext /P:Platform=%1 /P:Configuration=%2 /P:PlatformToolset=%3 /P:OutDir=..\nuget_package\output\%3\%1\%2\ /P:IntDir=..\nuget_package\tmp\%3\%1\%2\ ..\grpc.sln || goto :eof
+goto :eof
+
+
diff --git a/vsprojects/nuget_package/grpc.native.csharp_ext.nuspec b/vsprojects/nuget_package/grpc.native.csharp_ext.nuspec
new file mode 100644
index 0000000000..d225b77190
--- /dev/null
+++ b/vsprojects/nuget_package/grpc.native.csharp_ext.nuspec
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<package>
+ <metadata>
+ <id>grpc.native.csharp_ext</id>
+ <version>0.6.0.0</version>
+ <authors>Google Inc.</authors>
+ <owners>Jan Tattermusch</owners>
+ <licenseUrl>https://github.com/grpc/grpc/blob/master/LICENSE</licenseUrl>
+ <projectUrl>http://github.com/grpc/grpc</projectUrl>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <description>Native extension needed by gRPC C# library. This is not the package you are looking for, it is only meant to be used as a dependency.</description>
+ <releaseNotes>Release of gRPC C core 0.6.0 libraries.</releaseNotes>
+ <copyright>Copyright 2015</copyright>
+ <title>gRPC C# Native Extension</title>
+ <summary>Native library required by gRPC C#</summary>
+ <tags>gRPC native</tags>
+ <dependencies>
+ <dependency id="grpc.dependencies.zlib.redist" version="1.2.8.9" />
+ <dependency id="grpc.dependencies.openssl.redist" version="1.0.2.2" />
+ </dependencies>
+ </metadata>
+ <files>
+ <file src="grpc.native.csharp_ext.props" target="\build\portable-net45\grpc.native.csharp_ext.props" />
+ <file src="grpc.native.csharp_ext.targets" target="\build\portable-net45\grpc.native.csharp_ext.targets" />
+ <file src="output\v100\Win32\Release\grpc_csharp_ext.dll" target="/build/native/bin/v100\Win32\Release\grpc_csharp_ext.dll" />
+ <file src="output\v120\Win32\Release\grpc_csharp_ext.dll" target="/build/native/bin/v120\Win32\Release\grpc_csharp_ext.dll" />
+ <file src="output\v100\Win32\Debug\grpc_csharp_ext.dll" target="/build/native/bin/v100\Win32\Debug\grpc_csharp_ext.dll" />
+ <file src="output\v120\Win32\Debug\grpc_csharp_ext.dll" target="/build/native/bin/v120\Win32\Debug\grpc_csharp_ext.dll" />
+ </files>
+</package> \ No newline at end of file
diff --git a/vsprojects/nuget_package/grpc.native.csharp_ext.props b/vsprojects/nuget_package/grpc.native.csharp_ext.props
new file mode 100644
index 0000000000..63d23be3da
--- /dev/null
+++ b/vsprojects/nuget_package/grpc.native.csharp_ext.props
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <!-- Whether or not copy native dependencies to output directory after building -->
+ <CopyNativeDependencies Condition=" '$(CopyNativeDependencies)' == '' ">true</CopyNativeDependencies>
+
+ <!-- Set defaults for native dependencies if not already set. Properties can be overriden in the project files. -->
+ <NativeDependenciesToolset Condition=" '$(NativeDependenciesToolset)' == '' ">v120</NativeDependenciesToolset>
+ <NativeDependenciesPlatform Condition=" '$(NativeDependenciesPlatform)' == '' ">Win32</NativeDependenciesPlatform>
+ <NativeDependenciesConfiguration Condition=" '$(NativeDependenciesConfiguration)' == '' ">Debug</NativeDependenciesConfiguration>
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/vsprojects/nuget_package/grpc.native.csharp_ext.targets b/vsprojects/nuget_package/grpc.native.csharp_ext.targets
new file mode 100644
index 0000000000..1b69362d43
--- /dev/null
+++ b/vsprojects/nuget_package/grpc.native.csharp_ext.targets
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Choose>
+ <!-- Under older versions of Monodevelop, Choose is not supported and is just ignored, which gives us the desired effect. -->
+ <When Condition=" '$(OS)' != 'Unix' ">
+ <ItemGroup Condition=" '$(CopyNativeDependencies)' == 'true' ">
+ <Content Include="$(MSBuildThisFileDirectory)..\..\build\native\bin\$(NativeDependenciesToolset)\$(NativeDependenciesPlatform)\$(NativeDependenciesConfiguration)\grpc_csharp_ext.dll">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ </ItemGroup>
+ </When>
+ <Otherwise />
+ </Choose>
+</Project> \ No newline at end of file