Coreclr compatible DefaultSslRootsOverride.cs

Coreclr doesn't support Assembly.GetExecutingAssembly().
Use TypeInfo.Assembly instead, which is supported on all platform.
pull/5087/head
Chris Bacon 9 years ago
parent f6c7951e44
commit 1c755d5209
  1. 2
      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));

Loading…
Cancel
Save