Fix NativeExtensions for coreclr

Coreclr doesn't support Assembly.GetExecutingAssembly(),
use TypeInfo.Assembly instead, which is supported on all platforms.
pull/5063/head
Chris Bacon 9 years ago
parent 7abca85d21
commit b767d09c31
  1. 2
      src/csharp/Grpc.Core/Internal/NativeExtension.cs

@ -106,7 +106,7 @@ namespace Grpc.Core.Internal
private static string GetExecutingAssemblyDirectory()
{
return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
return Path.GetDirectoryName(typeof(NativeExtension).GetTypeInfo().Assembly.Location);
}
private static string GetPlatformString()

Loading…
Cancel
Save