diff --git a/src/PowerShellEditorServices.Hosting/EditorServicesLoader.cs b/src/PowerShellEditorServices.Hosting/EditorServicesLoader.cs index 7c69a895d..370dd6e96 100644 --- a/src/PowerShellEditorServices.Hosting/EditorServicesLoader.cs +++ b/src/PowerShellEditorServices.Hosting/EditorServicesLoader.cs @@ -117,7 +117,7 @@ public static EditorServicesLoader Create( { logger.Log( PsesLogLevel.Diagnostic, - $"Loaded {args.LoadedAssembly.GetName()}"); + $"Loaded '{args.LoadedAssembly.GetName()}' from '{args.LoadedAssembly.Location}'"); }; } @@ -133,16 +133,16 @@ public static EditorServicesLoader Create( string baseDirAsmPath = Path.Combine(s_psesBaseDirPath, dllName); if (File.Exists(baseDirAsmPath)) { - logger.Log(PsesLogLevel.Diagnostic, $"Loading {args.Name} from PSES base dir into LoadFrom context"); - return Assembly.LoadFrom(baseDirAsmPath); + logger.Log(PsesLogLevel.Diagnostic, $"Loading {args.Name} from PSES base dir into LoadFile context"); + return Assembly.LoadFile(baseDirAsmPath); } // Then look in the shared .NET Standard directory string asmPath = Path.Combine(s_psesDependencyDirPath, dllName); if (File.Exists(asmPath)) { - logger.Log(PsesLogLevel.Diagnostic, $"Loading {args.Name} from PSES dependency dir into LoadFrom context"); - return Assembly.LoadFrom(asmPath); + logger.Log(PsesLogLevel.Diagnostic, $"Loading {args.Name} from PSES dependency dir into LoadFile context"); + return Assembly.LoadFile(asmPath); } return null;