diff --git a/src/InformaticsGateway/Common/TypeExtensions.cs b/src/InformaticsGateway/Common/TypeExtensions.cs index ebc987a0a..3ee98321f 100755 --- a/src/InformaticsGateway/Common/TypeExtensions.cs +++ b/src/InformaticsGateway/Common/TypeExtensions.cs @@ -57,7 +57,7 @@ public static Type GetType(this Type interfaceType, string typeString) { var assembly = AppDomain.CurrentDomain.GetAssemblies().ToList().Find(z => !string.IsNullOrWhiteSpace(z.FullName) && z.FullName.StartsWith(name.FullName)); - assembly ??= Assembly.Load(Path.Combine(SR.PlugInDirectoryPath, $"{name.Name}.dll")); + assembly ??= Assembly.LoadFile(Path.Combine(SR.PlugInDirectoryPath, $"{name.Name}.dll")); return assembly; }, diff --git a/src/InformaticsGateway/Services/Common/IInputDataPluginEngineFactory.cs b/src/InformaticsGateway/Services/Common/IInputDataPluginEngineFactory.cs index 534ac2471..1eba49b66 100755 --- a/src/InformaticsGateway/Services/Common/IInputDataPluginEngineFactory.cs +++ b/src/InformaticsGateway/Services/Common/IInputDataPluginEngineFactory.cs @@ -101,7 +101,7 @@ private void LoadAssembliesFromPlugInsDirectory() foreach (var file in files) { _logger.LoadingAssembly(file); - var assembly = Assembly.Load(file); + var assembly = Assembly.LoadFile(file); var matchingTypes = assembly.GetTypes().Where(p => _type.IsAssignableFrom(p) && p != _type).ToList(); AddToCache(matchingTypes); diff --git a/src/InformaticsGateway/Test/Services/Common/InputDataPluginEngineTest.cs b/src/InformaticsGateway/Test/Services/Common/InputDataPluginEngineTest.cs index 3fdcf2bc1..2cedd16f7 100755 --- a/src/InformaticsGateway/Test/Services/Common/InputDataPluginEngineTest.cs +++ b/src/InformaticsGateway/Test/Services/Common/InputDataPluginEngineTest.cs @@ -102,7 +102,7 @@ public async Task GivenAnInputDataPlugInEngine_WhenExecutePlugInsIsCalledWithout "calling", "called"); - await Assert.ThrowsAsync(async () => await pluginEngine.ExecutePlugInsAsync(dicomFile, dicomInfo)); + await Assert.ThrowsAsync(async () => await pluginEngine.ExecutePlugInsAsync(dicomFile, dicomInfo)); } [Fact] diff --git a/src/InformaticsGateway/Test/Services/Common/OutputDataPluginEngineTest.cs b/src/InformaticsGateway/Test/Services/Common/OutputDataPluginEngineTest.cs index 30151103d..90595f2ff 100755 --- a/src/InformaticsGateway/Test/Services/Common/OutputDataPluginEngineTest.cs +++ b/src/InformaticsGateway/Test/Services/Common/OutputDataPluginEngineTest.cs @@ -102,7 +102,7 @@ public async Task GivenAnOutputDataPlugInEngine_WhenExecutePlugInsIsCalledWithou WorkflowInstanceId = Guid.NewGuid().ToString(), }, "filename.dcm"); - await Assert.ThrowsAsync(async () => await pluginEngine.ExecutePlugInsAsync(message)); + await Assert.ThrowsAsync(async () => await pluginEngine.ExecutePlugInsAsync(message)); } [Fact]