From d38e372d71e355ac483ac12506118d259ed61f59 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 27 Jan 2016 18:09:12 -0800 Subject: add C# DistribTest project --- test/distrib/csharp/.gitignore | 5 + test/distrib/csharp/DistribTest.sln | 22 ++++ test/distrib/csharp/DistribTest/.gitignore | 2 + test/distrib/csharp/DistribTest/App.config | 14 +++ test/distrib/csharp/DistribTest/DistribTest.csproj | 112 +++++++++++++++++++++ test/distrib/csharp/DistribTest/Program.cs | 17 ++++ .../csharp/DistribTest/Properties/AssemblyInfo.cs | 36 +++++++ test/distrib/csharp/DistribTest/packages.config | 16 +++ test/distrib/csharp/NuGet.config | 6 ++ test/distrib/csharp/build_vs2015.bat | 10 ++ test/distrib/csharp/update_version.sh | 8 ++ 11 files changed, 248 insertions(+) create mode 100644 test/distrib/csharp/.gitignore create mode 100644 test/distrib/csharp/DistribTest.sln create mode 100644 test/distrib/csharp/DistribTest/.gitignore create mode 100644 test/distrib/csharp/DistribTest/App.config create mode 100644 test/distrib/csharp/DistribTest/DistribTest.csproj create mode 100644 test/distrib/csharp/DistribTest/Program.cs create mode 100644 test/distrib/csharp/DistribTest/Properties/AssemblyInfo.cs create mode 100644 test/distrib/csharp/DistribTest/packages.config create mode 100644 test/distrib/csharp/NuGet.config create mode 100644 test/distrib/csharp/build_vs2015.bat create mode 100644 test/distrib/csharp/update_version.sh (limited to 'test/distrib/csharp') diff --git a/test/distrib/csharp/.gitignore b/test/distrib/csharp/.gitignore new file mode 100644 index 0000000000..cb4b0a9212 --- /dev/null +++ b/test/distrib/csharp/.gitignore @@ -0,0 +1,5 @@ +packages +*.userprefs +*.csproj.user +*.suo +/TestNugetFeed \ No newline at end of file diff --git a/test/distrib/csharp/DistribTest.sln b/test/distrib/csharp/DistribTest.sln new file mode 100644 index 0000000000..0eca35c30f --- /dev/null +++ b/test/distrib/csharp/DistribTest.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.31101.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DistribTest", "DistribTest\DistribTest.csproj", "{A3E61CC3-3710-49A3-A830-A0066EDBCE2F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A3E61CC3-3710-49A3-A830-A0066EDBCE2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3E61CC3-3710-49A3-A830-A0066EDBCE2F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3E61CC3-3710-49A3-A830-A0066EDBCE2F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3E61CC3-3710-49A3-A830-A0066EDBCE2F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/test/distrib/csharp/DistribTest/.gitignore b/test/distrib/csharp/DistribTest/.gitignore new file mode 100644 index 0000000000..1746e3269e --- /dev/null +++ b/test/distrib/csharp/DistribTest/.gitignore @@ -0,0 +1,2 @@ +bin +obj diff --git a/test/distrib/csharp/DistribTest/App.config b/test/distrib/csharp/DistribTest/App.config new file mode 100644 index 0000000000..30d3e09472 --- /dev/null +++ b/test/distrib/csharp/DistribTest/App.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/distrib/csharp/DistribTest/DistribTest.csproj b/test/distrib/csharp/DistribTest/DistribTest.csproj new file mode 100644 index 0000000000..a843df1664 --- /dev/null +++ b/test/distrib/csharp/DistribTest/DistribTest.csproj @@ -0,0 +1,112 @@ + + + + + Debug + AnyCPU + {A3E61CC3-3710-49A3-A830-A0066EDBCE2F} + Exe + Properties + DistribTest + DistribTest + v4.5 + 512 + b86d820c + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\BouncyCastle.1.7.0\lib\Net40-Client\BouncyCastle.Crypto.dll + + + ..\packages\Google.Apis.Auth.1.9.3\lib\net40\Google.Apis.Auth.dll + + + ..\packages\Google.Apis.Auth.1.9.3\lib\net40\Google.Apis.Auth.PlatformServices.dll + + + ..\packages\Google.Apis.Core.1.9.3\lib\portable-net40+sl50+win+wpa81+wp80\Google.Apis.Core.dll + + + ..\packages\Grpc.Auth.0.13.0\lib\net45\Grpc.Auth.dll + + + ..\packages\Grpc.Core.0.13.0\lib\net45\Grpc.Core.dll + + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll + + + + + ..\packages\Ix-Async.1.2.3\lib\net45\System.Interactive.Async.dll + + + + + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll + + + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + \ No newline at end of file diff --git a/test/distrib/csharp/DistribTest/Program.cs b/test/distrib/csharp/DistribTest/Program.cs new file mode 100644 index 0000000000..5a2c0eb504 --- /dev/null +++ b/test/distrib/csharp/DistribTest/Program.cs @@ -0,0 +1,17 @@ +using System; +using Grpc.Core; + +namespace TestGrpcPackage +{ + class MainClass + { + public static void Main(string[] args) + { + // This code doesn't do much but makes sure the native extension is loaded + // which is what we are testing here. + Channel c = new Channel("127.0.0.1:1000", ChannelCredentials.Insecure); + c.ShutdownAsync().Wait(); + Console.WriteLine("Success!"); + } + } +} diff --git a/test/distrib/csharp/DistribTest/Properties/AssemblyInfo.cs b/test/distrib/csharp/DistribTest/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..bc25b263ca --- /dev/null +++ b/test/distrib/csharp/DistribTest/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("DistribTest")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("DistribTest")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("68755789-f103-4134-9027-b80a2fc9e21a")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/test/distrib/csharp/DistribTest/packages.config b/test/distrib/csharp/DistribTest/packages.config new file mode 100644 index 0000000000..ab2fb33de6 --- /dev/null +++ b/test/distrib/csharp/DistribTest/packages.config @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/distrib/csharp/NuGet.config b/test/distrib/csharp/NuGet.config new file mode 100644 index 0000000000..5c48bcc925 --- /dev/null +++ b/test/distrib/csharp/NuGet.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/test/distrib/csharp/build_vs2015.bat b/test/distrib/csharp/build_vs2015.bat new file mode 100644 index 0000000000..50485a30f3 --- /dev/null +++ b/test/distrib/csharp/build_vs2015.bat @@ -0,0 +1,10 @@ +@rem Convenience wrapper that runs specified gRPC target using msbuild +@rem Usage: build.bat TARGET_NAME + +setlocal +@rem Set VS variables (uses Visual Studio 2015) +@call "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat" x86 + +msbuild %* +exit /b %ERRORLEVEL% +endlocal diff --git a/test/distrib/csharp/update_version.sh b/test/distrib/csharp/update_version.sh new file mode 100644 index 0000000000..1df8466832 --- /dev/null +++ b/test/distrib/csharp/update_version.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e + +cd $(dirname $0) + +# Replaces version placeholder with value provided as first argument. +sed -i "s/__GRPC_NUGET_VERSION__/$1/g" DistribTest/packages.config DistribTest/DistribTest.csproj \ No newline at end of file -- cgit v1.2.3