diff options
Diffstat (limited to 'src/csharp')
-rw-r--r-- | src/csharp/Grpc.Core/Grpc.Core.nuspec | 8 | ||||
-rw-r--r-- | src/csharp/Grpc.Core/Grpc.Core.targets (renamed from src/csharp/grpc.native.csharp/grpc.native.csharp.targets) | 0 | ||||
-rw-r--r-- | src/csharp/Grpc.Core/Internal/NativeExtension.cs | 27 | ||||
-rw-r--r-- | src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs | 2 | ||||
-rw-r--r-- | src/csharp/Grpc.Core/Internal/UnmanagedLibrary.cs | 24 | ||||
-rw-r--r-- | src/csharp/Grpc.IntegrationTesting/HeaderInterceptorTest.cs | 113 | ||||
-rw-r--r-- | src/csharp/Grpc.IntegrationTesting/TestServiceGrpc.cs | 204 | ||||
-rw-r--r-- | src/csharp/build_packages.bat | 13 | ||||
-rw-r--r-- | src/csharp/grpc.native.csharp/README.md | 22 |
9 files changed, 51 insertions, 362 deletions
diff --git a/src/csharp/Grpc.Core/Grpc.Core.nuspec b/src/csharp/Grpc.Core/Grpc.Core.nuspec index 49bccb050e..0ada0049c2 100644 --- a/src/csharp/Grpc.Core/Grpc.Core.nuspec +++ b/src/csharp/Grpc.Core/Grpc.Core.nuspec @@ -16,7 +16,6 @@ <tags>gRPC RPC Protocol HTTP/2</tags> <dependencies> <dependency id="Ix-Async" version="1.2.5" /> - <dependency id="grpc.native.csharp" version="$version$" /> </dependencies> </metadata> <files> @@ -24,5 +23,12 @@ <file src="bin/ReleaseSigned/Grpc.Core.pdb" target="lib/net45" /> <file src="bin/ReleaseSigned/Grpc.Core.xml" target="lib/net45" /> <file src="**\*.cs" target="src" /> + <file src="Grpc.Core.targets" target="\build\net45\Grpc.Core.targets" /> + <file src="windows_x86/grpc_csharp_ext.dll" target="/build/native/bin/windows_x86/grpc_csharp_ext.dll" /> + <file src="windows_x64/grpc_csharp_ext.dll" target="/build/native/bin/windows_x64/grpc_csharp_ext.dll" /> + <file src="linux_x86/libgrpc_csharp_ext.so" target="/build/native/bin/linux_x86/libgrpc_csharp_ext.so" /> + <file src="linux_x64/libgrpc_csharp_ext.so" target="/build/native/bin/linux_x64/libgrpc_csharp_ext.so" /> + <file src="macosx_x86/libgrpc_csharp_ext.dylib" target="/build/native/bin/macosx_x86/libgrpc_csharp_ext.dylib" /> + <file src="macosx_x64/libgrpc_csharp_ext.dylib" target="/build/native/bin/macosx_x64/libgrpc_csharp_ext.dylib" /> </files> </package> diff --git a/src/csharp/grpc.native.csharp/grpc.native.csharp.targets b/src/csharp/Grpc.Core/Grpc.Core.targets index 501fc50548..501fc50548 100644 --- a/src/csharp/grpc.native.csharp/grpc.native.csharp.targets +++ b/src/csharp/Grpc.Core/Grpc.Core.targets diff --git a/src/csharp/Grpc.Core/Internal/NativeExtension.cs b/src/csharp/Grpc.Core/Internal/NativeExtension.cs index bff1e56582..b45ba19c24 100644 --- a/src/csharp/Grpc.Core/Internal/NativeExtension.cs +++ b/src/csharp/Grpc.Core/Internal/NativeExtension.cs @@ -32,7 +32,6 @@ #endregion using System; -using System.Globalization; using System.IO; using System.Reflection; @@ -46,6 +45,7 @@ namespace Grpc.Core.Internal internal sealed class NativeExtension { const string NativeLibrariesDir = "nativelibs"; + const string DnxStyleNativeLibrariesDir = "../../build/native/bin/"; static readonly ILogger Logger = GrpcEnvironment.Logger.ForType<NativeExtension>(); static readonly object staticLock = new object(); @@ -100,31 +100,48 @@ namespace Grpc.Core.Internal // TODO: allow customizing path to native extension (possibly through exposing a GrpcEnvironment property). var libraryFlavor = string.Format("{0}_{1}", GetPlatformString(), GetArchitectureString()); - var fullPath = Path.Combine(Path.GetDirectoryName(GetAssemblyPath()), - NativeLibrariesDir, libraryFlavor, GetNativeLibraryFilename()); - return new UnmanagedLibrary(fullPath); + + var assemblyDirectory = Path.GetDirectoryName(GetAssemblyPath()); + + // With old-style VS projects, the native libraries get copied using a .targets rule to the build output folder + // alongside the compiled assembly. + var classicPath = Path.Combine(assemblyDirectory, NativeLibrariesDir, libraryFlavor, GetNativeLibraryFilename()); + + // DNX-style project.json projects will use Grpc.Core assembly directly in the location where it got restored + // by nuget. We locate the native libraries based on known structure of Grpc.Core nuget package. + var dnxStylePath = Path.Combine(assemblyDirectory, DnxStyleNativeLibrariesDir, libraryFlavor, GetNativeLibraryFilename()); + + return new UnmanagedLibrary(new string[] {classicPath, dnxStylePath}); } private static string GetAssemblyPath() { var assembly = typeof(NativeExtension).GetTypeInfo().Assembly; - +#if DOTNET5_4 + // Assembly.EscapedCodeBase does not exit under CoreCLR, but assemblies imported from a nuget package + // don't seem to be shadowed by DNX-based projects at all. + return assembly.Location; +#else // If assembly is shadowed (e.g. in a webapp), EscapedCodeBase is pointing // to the original location of the assembly, and Location is pointing // to the shadow copy. We care about the original location because // the native dlls don't get shadowed. + var escapedCodeBase = assembly.EscapedCodeBase; if (IsFileUri(escapedCodeBase)) { return new Uri(escapedCodeBase).LocalPath; } return assembly.Location; +#endif } +#if !DOTNET5_4 private static bool IsFileUri(string uri) { return uri.ToLowerInvariant().StartsWith(Uri.UriSchemeFile); } +#endif private static string GetPlatformString() { diff --git a/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs b/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs index 0e4d9070d3..26af6311d5 100644 --- a/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs +++ b/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs @@ -87,7 +87,7 @@ namespace Grpc.Core.Internal } } - private async void StartGetMetadata(AuthInterceptorContext context, IntPtr callbackPtr, IntPtr userDataPtr) + private async Task StartGetMetadata(AuthInterceptorContext context, IntPtr callbackPtr, IntPtr userDataPtr) { try { diff --git a/src/csharp/Grpc.Core/Internal/UnmanagedLibrary.cs b/src/csharp/Grpc.Core/Internal/UnmanagedLibrary.cs index 47308f8c9e..5a80746101 100644 --- a/src/csharp/Grpc.Core/Internal/UnmanagedLibrary.cs +++ b/src/csharp/Grpc.Core/Internal/UnmanagedLibrary.cs @@ -32,8 +32,6 @@ #endregion using System; -using System.Collections.Concurrent; -using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.InteropServices; @@ -63,14 +61,9 @@ namespace Grpc.Core.Internal readonly string libraryPath; readonly IntPtr handle; - public UnmanagedLibrary(string libraryPath) + public UnmanagedLibrary(string[] libraryPathAlternatives) { - this.libraryPath = GrpcPreconditions.CheckNotNull(libraryPath); - - if (!File.Exists(this.libraryPath)) - { - throw new FileNotFoundException("Error loading native library. File does not exist.", this.libraryPath); - } + this.libraryPath = FirstValidLibraryPath(libraryPathAlternatives); Logger.Debug("Attempting to load native library \"{0}\"", this.libraryPath); @@ -139,6 +132,19 @@ namespace Grpc.Core.Internal throw new InvalidOperationException("Unsupported platform."); } + private static string FirstValidLibraryPath(string[] libraryPathAlternatives) + { + GrpcPreconditions.CheckArgument(libraryPathAlternatives.Length > 0, "libraryPathAlternatives cannot be empty."); + foreach (var path in libraryPathAlternatives) + { + if (File.Exists(path)) + { + return path; + } + } + throw new FileNotFoundException(String.Format("Error loading native library. Not found in any of the possible locations {0}", libraryPathAlternatives)); + } + private static class Windows { [DllImport("kernel32.dll")] diff --git a/src/csharp/Grpc.IntegrationTesting/HeaderInterceptorTest.cs b/src/csharp/Grpc.IntegrationTesting/HeaderInterceptorTest.cs deleted file mode 100644 index 1d758b7540..0000000000 --- a/src/csharp/Grpc.IntegrationTesting/HeaderInterceptorTest.cs +++ /dev/null @@ -1,113 +0,0 @@ -#region Copyright notice and license - -// Copyright 2015, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#endregion - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using Grpc.Core; -using Grpc.Core.Utils; -using Grpc.Testing; -using NUnit.Framework; - -namespace Grpc.IntegrationTesting -{ - public class HeaderInterceptorTest - { - const string Host = "localhost"; - Server server; - Channel channel; - TestService.TestServiceClient client; - - [TestFixtureSetUp] - public void Init() - { - server = new Server - { - Services = { TestService.BindService(new TestServiceImpl()) }, - Ports = { { Host, ServerPort.PickUnused, ServerCredentials.Insecure } } - }; - server.Start(); - - channel = new Channel(Host, server.Ports.Single().BoundPort, ChannelCredentials.Insecure); - client = TestService.NewClient(channel); - } - - [TestFixtureTearDown] - public void Cleanup() - { - channel.ShutdownAsync().Wait(); - server.ShutdownAsync().Wait(); - } - - [Test] - public async Task HeaderInterceptor_CreateMetadata() - { - var key = "x-grpc-test-echo-initial"; - client.HeaderInterceptor = new HeaderInterceptor((method, metadata) => - { - metadata.Add(key, "ABC"); - }); - - var call = client.UnaryCallAsync(new SimpleRequest()); - await call; - - var responseHeaders = await call.ResponseHeadersAsync; - Assert.AreEqual("ABC", responseHeaders.First((entry) => entry.Key == key).Value); - } - - [Test] - public async Task HeaderInterceptor_AppendMetadata() - { - var initialKey = "x-grpc-test-echo-initial"; - var trailingKey = "x-grpc-test-echo-trailing-bin"; - - client.HeaderInterceptor = new HeaderInterceptor((method, metadata) => - { - metadata.Add(initialKey, "ABC"); - }); - - var headers = new Metadata - { - { trailingKey, new byte[] {0xaa} } - }; - var call = client.UnaryCallAsync(new SimpleRequest(), headers: headers); - await call; - - var responseHeaders = await call.ResponseHeadersAsync; - Assert.AreEqual("ABC", responseHeaders.First((entry) => entry.Key == initialKey).Value); - CollectionAssert.AreEqual(new byte[] {0xaa}, call.GetTrailers().First((entry) => entry.Key == trailingKey).ValueBytes); - } - } -} diff --git a/src/csharp/Grpc.IntegrationTesting/TestServiceGrpc.cs b/src/csharp/Grpc.IntegrationTesting/TestServiceGrpc.cs deleted file mode 100644 index 9f14dad6c0..0000000000 --- a/src/csharp/Grpc.IntegrationTesting/TestServiceGrpc.cs +++ /dev/null @@ -1,204 +0,0 @@ -#region Copyright notice and license - -// Copyright 2015, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#endregion - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Grpc.Core; - -namespace grpc.testing -{ - /// <summary> - /// TestService (this is handwritten version of code that will normally be generated). - /// </summary> - public class TestServiceGrpc - { - static readonly string ServiceName = "/grpc.testing.TestService"; - - static readonly Marshaller<Empty> EmptyMarshaller = Marshallers.Create((arg) => arg.ToByteArray(), Empty.ParseFrom); - static readonly Marshaller<SimpleRequest> SimpleRequestMarshaller = Marshallers.Create((arg) => arg.ToByteArray(), SimpleRequest.ParseFrom); - static readonly Marshaller<SimpleResponse> SimpleResponseMarshaller = Marshallers.Create((arg) => arg.ToByteArray(), SimpleResponse.ParseFrom); - static readonly Marshaller<StreamingOutputCallRequest> StreamingOutputCallRequestMarshaller = Marshallers.Create((arg) => arg.ToByteArray(), StreamingOutputCallRequest.ParseFrom); - static readonly Marshaller<StreamingOutputCallResponse> StreamingOutputCallResponseMarshaller = Marshallers.Create((arg) => arg.ToByteArray(), StreamingOutputCallResponse.ParseFrom); - static readonly Marshaller<StreamingInputCallRequest> StreamingInputCallRequestMarshaller = Marshallers.Create((arg) => arg.ToByteArray(), StreamingInputCallRequest.ParseFrom); - static readonly Marshaller<StreamingInputCallResponse> StreamingInputCallResponseMarshaller = Marshallers.Create((arg) => arg.ToByteArray(), StreamingInputCallResponse.ParseFrom); - - static readonly Method<Empty, Empty> EmptyCallMethod = new Method<Empty, Empty>( - MethodType.Unary, - "EmptyCall", - EmptyMarshaller, - EmptyMarshaller); - - static readonly Method<SimpleRequest, SimpleResponse> UnaryCallMethod = new Method<SimpleRequest, SimpleResponse>( - MethodType.Unary, - "UnaryCall", - SimpleRequestMarshaller, - SimpleResponseMarshaller); - - static readonly Method<StreamingOutputCallRequest, StreamingOutputCallResponse> StreamingOutputCallMethod = new Method<StreamingOutputCallRequest, StreamingOutputCallResponse>( - MethodType.ServerStreaming, - "StreamingOutputCall", - StreamingOutputCallRequestMarshaller, - StreamingOutputCallResponseMarshaller); - - static readonly Method<StreamingInputCallRequest, StreamingInputCallResponse> StreamingInputCallMethod = new Method<StreamingInputCallRequest, StreamingInputCallResponse>( - MethodType.ClientStreaming, - "StreamingInputCall", - StreamingInputCallRequestMarshaller, - StreamingInputCallResponseMarshaller); - - static readonly Method<StreamingOutputCallRequest, StreamingOutputCallResponse> FullDuplexCallMethod = new Method<StreamingOutputCallRequest, StreamingOutputCallResponse>( - MethodType.DuplexStreaming, - "FullDuplexCall", - StreamingOutputCallRequestMarshaller, - StreamingOutputCallResponseMarshaller); - - static readonly Method<StreamingOutputCallRequest, StreamingOutputCallResponse> HalfDuplexCallMethod = new Method<StreamingOutputCallRequest, StreamingOutputCallResponse>( - MethodType.DuplexStreaming, - "HalfDuplexCall", - StreamingOutputCallRequestMarshaller, - StreamingOutputCallResponseMarshaller); - - public interface ITestServiceClient - { - Empty EmptyCall(Empty request, CancellationToken token = default(CancellationToken)); - - Task<Empty> EmptyCallAsync(Empty request, CancellationToken token = default(CancellationToken)); - - SimpleResponse UnaryCall(SimpleRequest request, CancellationToken token = default(CancellationToken)); - - Task<SimpleResponse> UnaryCallAsync(SimpleRequest request, CancellationToken token = default(CancellationToken)); - - AsyncServerStreamingCall<StreamingOutputCallResponse> StreamingOutputCall(StreamingOutputCallRequest request, CancellationToken token = default(CancellationToken)); - - AsyncClientStreamingCall<StreamingInputCallRequest, StreamingInputCallResponse> StreamingInputCall(CancellationToken token = default(CancellationToken)); - - AsyncDuplexStreamingCall<StreamingOutputCallRequest, StreamingOutputCallResponse> FullDuplexCall(CancellationToken token = default(CancellationToken)); - - AsyncDuplexStreamingCall<StreamingOutputCallRequest, StreamingOutputCallResponse> HalfDuplexCall(CancellationToken token = default(CancellationToken)); - } - - public class TestServiceClientStub : AbstractStub<TestServiceClientStub, StubConfiguration>, ITestServiceClient - { - public TestServiceClientStub(Channel channel) : base(channel, StubConfiguration.Default) - { - } - - public TestServiceClientStub(Channel channel, StubConfiguration config) : base(channel, config) - { - } - - public Empty EmptyCall(Empty request, CancellationToken token = default(CancellationToken)) - { - var call = CreateCall(ServiceName, EmptyCallMethod); - return Calls.BlockingUnaryCall(call, request, token); - } - - public Task<Empty> EmptyCallAsync(Empty request, CancellationToken token = default(CancellationToken)) - { - var call = CreateCall(ServiceName, EmptyCallMethod); - return Calls.AsyncUnaryCall(call, request, token); - } - - public SimpleResponse UnaryCall(SimpleRequest request, CancellationToken token = default(CancellationToken)) - { - var call = CreateCall(ServiceName, UnaryCallMethod); - return Calls.BlockingUnaryCall(call, request, token); - } - - public Task<SimpleResponse> UnaryCallAsync(SimpleRequest request, CancellationToken token = default(CancellationToken)) - { - var call = CreateCall(ServiceName, UnaryCallMethod); - return Calls.AsyncUnaryCall(call, request, token); - } - - public AsyncServerStreamingCall<StreamingOutputCallResponse> StreamingOutputCall(StreamingOutputCallRequest request, CancellationToken token = default(CancellationToken)) - { - var call = CreateCall(ServiceName, StreamingOutputCallMethod); - return Calls.AsyncServerStreamingCall(call, request, token); - } - - public AsyncClientStreamingCall<StreamingInputCallRequest, StreamingInputCallResponse> StreamingInputCall(CancellationToken token = default(CancellationToken)) - { - var call = CreateCall(ServiceName, StreamingInputCallMethod); - return Calls.AsyncClientStreamingCall(call, token); - } - - public AsyncDuplexStreamingCall<StreamingOutputCallRequest, StreamingOutputCallResponse> FullDuplexCall(CancellationToken token = default(CancellationToken)) - { - var call = CreateCall(ServiceName, FullDuplexCallMethod); - return Calls.AsyncDuplexStreamingCall(call, token); - } - - public AsyncDuplexStreamingCall<StreamingOutputCallRequest, StreamingOutputCallResponse> HalfDuplexCall(CancellationToken token = default(CancellationToken)) - { - var call = CreateCall(ServiceName, HalfDuplexCallMethod); - return Calls.AsyncDuplexStreamingCall(call, token); - } - } - - // server-side interface - public interface ITestService - { - Task<Empty> EmptyCall(ServerCallContext context, Empty request); - - Task<SimpleResponse> UnaryCall(ServerCallContext context, SimpleRequest request); - - Task StreamingOutputCall(ServerCallContext context, StreamingOutputCallRequest request, IServerStreamWriter<StreamingOutputCallResponse> responseStream); - - Task<StreamingInputCallResponse> StreamingInputCall(ServerCallContext context, IAsyncStreamReader<StreamingInputCallRequest> requestStream); - - Task FullDuplexCall(ServerCallContext context, IAsyncStreamReader<StreamingOutputCallRequest> requestStream, IServerStreamWriter<StreamingOutputCallResponse> responseStream); - - Task HalfDuplexCall(ServerCallContext context, IAsyncStreamReader<StreamingOutputCallRequest> requestStream, IServerStreamWriter<StreamingOutputCallResponse> responseStream); - } - - public static ServerServiceDefinition BindService(ITestService serviceImpl) - { - return ServerServiceDefinition.CreateBuilder(ServiceName) - .AddMethod(EmptyCallMethod, serviceImpl.EmptyCall) - .AddMethod(UnaryCallMethod, serviceImpl.UnaryCall) - .AddMethod(StreamingOutputCallMethod, serviceImpl.StreamingOutputCall) - .AddMethod(StreamingInputCallMethod, serviceImpl.StreamingInputCall) - .AddMethod(FullDuplexCallMethod, serviceImpl.FullDuplexCall) - .AddMethod(HalfDuplexCallMethod, serviceImpl.HalfDuplexCall) - .Build(); - } - - public static ITestServiceClient NewStub(Channel channel) - { - return new TestServiceClientStub(channel); - } - } -} diff --git a/src/csharp/build_packages.bat b/src/csharp/build_packages.bat index 7c42a6d3fc..9a60be26b6 100644 --- a/src/csharp/build_packages.bat +++ b/src/csharp/build_packages.bat @@ -12,12 +12,12 @@ set NUGET=C:\nuget\nuget.exe @rem Collect the artifacts built by the previous build step if running on Jenkins @rem TODO(jtattermusch): is there a better way to do this? -xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=windows\artifacts\* grpc.native.csharp\windows_x86\ -xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=windows\artifacts\* grpc.native.csharp\windows_x64\ -xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=linux\artifacts\* grpc.native.csharp\linux_x86\ -xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=linux\artifacts\* grpc.native.csharp\linux_x64\ -xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=macos\artifacts\* grpc.native.csharp\macosx_x86\ -xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=macos\artifacts\* grpc.native.csharp\macosx_x64\ +xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=windows\artifacts\* Grpc.Core\windows_x86\ +xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=windows\artifacts\* Grpc.Core\windows_x64\ +xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=linux\artifacts\* Grpc.Core\linux_x86\ +xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=linux\artifacts\* Grpc.Core\linux_x64\ +xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=macos\artifacts\* Grpc.Core\macosx_x86\ +xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=macos\artifacts\* Grpc.Core\macosx_x64\ @rem Collect protoc artifacts built by the previous build step xcopy /Y /I ..\..\architecture=x86,language=protoc,platform=windows\artifacts\* protoc_plugins\windows_x86\ @@ -42,7 +42,6 @@ msbuild Grpc.sln /p:Configuration=ReleaseSigned || goto :error endlocal -%NUGET% pack grpc.native.csharp\grpc.native.csharp.nuspec -Version %VERSION% || goto :error %NUGET% pack Grpc.Auth\Grpc.Auth.nuspec -Symbols -Version %VERSION% || goto :error %NUGET% pack Grpc.Core\Grpc.Core.nuspec -Symbols -Version %VERSION% || goto :error %NUGET% pack Grpc.HealthCheck\Grpc.HealthCheck.nuspec -Symbols -Version %VERSION_WITH_BETA% -Properties ProtobufVersion=%PROTOBUF_VERSION% || goto :error diff --git a/src/csharp/grpc.native.csharp/README.md b/src/csharp/grpc.native.csharp/README.md deleted file mode 100644 index 77f1cb9b1f..0000000000 --- a/src/csharp/grpc.native.csharp/README.md +++ /dev/null @@ -1,22 +0,0 @@ -gRPC Native Nuget package -========================= - -Prerequisites -------------- - -NuGet binary - -Building the package --------------------- - -To build the native package, you need precompiled versions -of grpc_csharp_ext library artifacts for Windows, Linux and Mac. -In the normal gRPC release process, these are built by a Jenkins -job and they are copied to the expected location before building -the native nuget package is attempted. - -See tools/run_tests/build_artifacts.py for more details how -precompiled artifacts are built. - -When building the native NuGet package, ignore the "Assembly outside lib folder" -warnings (the DLLs are not assemblies, they are native libraries). |