From cee0735997b79f39c343303a82c619d4fe48a8d2 Mon Sep 17 00:00:00 2001 From: Loning Date: Sat, 20 Apr 2019 16:45:39 +0800 Subject: [PATCH] make SDK can load from loaded assembly locations --- src/AElf.Runtime.CSharp.Core/SdkStreamManager.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/AElf.Runtime.CSharp.Core/SdkStreamManager.cs b/src/AElf.Runtime.CSharp.Core/SdkStreamManager.cs index 198a83c61e..3810499d71 100644 --- a/src/AElf.Runtime.CSharp.Core/SdkStreamManager.cs +++ b/src/AElf.Runtime.CSharp.Core/SdkStreamManager.cs @@ -23,7 +23,12 @@ public Stream GetStream(AssemblyName assemblyName) var path = Path.Combine(_sdkDir, assemblyName.Name + ".dll"); if (!File.Exists(path)) { - return null; + var assembly = Assembly.Load(assemblyName); + + if (assembly == null) + return null; + + path = assembly.Location; } if (!_cachedSdkStreams.TryGetValue(path, out var ms))