From a64dfa625a2d66260806b60060476bab83fd01ac Mon Sep 17 00:00:00 2001 From: David Wilson Date: Thu, 22 Jun 2017 14:24:37 -0700 Subject: [PATCH] Fix issue with loading PSES in PowerShell Core 6.0.0-beta3 This change fixes an issue caused by PowerShell Core 6.0.0-beta3's AssemblyLoadContext changes where the Protocol assembly isn't being auto-loaded when the Host assembly gets loaded. The fix is to explicitly load that assembly when loaded inside of PowerShell Core. Resolves #529 --- module/PowerShellEditorServices/PowerShellEditorServices.psm1 | 1 + 1 file changed, 1 insertion(+) diff --git a/module/PowerShellEditorServices/PowerShellEditorServices.psm1 b/module/PowerShellEditorServices/PowerShellEditorServices.psm1 index ada179274..5e4f38191 100644 --- a/module/PowerShellEditorServices/PowerShellEditorServices.psm1 +++ b/module/PowerShellEditorServices/PowerShellEditorServices.psm1 @@ -9,6 +9,7 @@ if (!$PSVersionTable.PSEdition -or $PSVersionTable.PSEdition -eq "Desktop") { } else { Add-Type -Path "$PSScriptRoot/bin/Core/Microsoft.PowerShell.EditorServices.dll" + Add-Type -Path "$PSScriptRoot/bin/Core/Microsoft.PowerShell.EditorServices.Protocol.dll" Add-Type -Path "$PSScriptRoot/bin/Core/Microsoft.PowerShell.EditorServices.Host.dll" }