From 1c755d5209b0da68196a18a637d7e52fd28c7302 Mon Sep 17 00:00:00 2001 From: Chris Bacon Date: Fri, 5 Feb 2016 10:33:41 +0000 Subject: [PATCH] Coreclr compatible DefaultSslRootsOverride.cs Coreclr doesn't support Assembly.GetExecutingAssembly(). Use TypeInfo.Assembly instead, which is supported on all platform. --- src/csharp/Grpc.Core/Internal/DefaultSslRootsOverride.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Core/Internal/DefaultSslRootsOverride.cs b/src/csharp/Grpc.Core/Internal/DefaultSslRootsOverride.cs index eeaa7add813..dfaee5d9d7c 100644 --- a/src/csharp/Grpc.Core/Internal/DefaultSslRootsOverride.cs +++ b/src/csharp/Grpc.Core/Internal/DefaultSslRootsOverride.cs @@ -56,7 +56,7 @@ namespace Grpc.Core.Internal { lock (staticLock) { - var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(RootsPemResourceName); + var stream = typeof(DefaultSslRootsOverride).GetTypeInfo().Assembly.GetManifestResourceStream(RootsPemResourceName); if (stream == null) { throw new IOException(string.Format("Error loading the embedded resource \"{0}\"", RootsPemResourceName));