You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PowerShell Preview Extension v2019.5.0 fails to load on Windows Server 2016 with .NET Framework version 4.6.2 installed with the following error:
An error occurred while starting PowerShell Editor Services:
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
at Microsoft.PowerShell.Commands.AddTypeCommand.LoadAssemblyFromPathOrName(List`1 generatedTypes)
at Microsoft.PowerShell.Commands.AddTypeCommand.EndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
The log output is:
6/13/2019 5:13:27 PM [NORMAL] - Visual Studio Code v1.35.1 64-bit
6/13/2019 5:13:27 PM [NORMAL] - PowerShell Extension v2019.5.0
6/13/2019 5:13:27 PM [NORMAL] - Operating System: Windows 64-bit
6/13/2019 5:13:27 PM [NORMAL] - Path specified by 'powerShellExePath' setting - '' - not found, reverting to default PowerShell path.
6/13/2019 5:13:27 PM [NORMAL] - Language server starting --
6/13/2019 5:13:27 PM [NORMAL] - exe: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
6/13/2019 5:13:27 PM [NORMAL] - args: C:\Users\steel.28a\.vscode\extensions\ms-vscode.powershell-preview-2019.5.0\modules\PowerShellEditorServices\Start-EditorServices.ps1 -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2019.5.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'C:\Users\steel.28a\.vscode\extensions\ms-vscode.powershell-preview-2019.5.0\modules' -EnableConsoleRepl -LogLevel 'Diagnostic' -LogPath 'C:\Users\steel.28a\.vscode\extensions\ms-vscode.powershell-preview-2019.5.0\logs\1560460407-f980c647-68f0-44a2-804d-2329acb26ab11560460398815\EditorServices.log' -SessionDetailsPath 'C:\Users\steel.28a\.vscode\extensions\ms-vscode.powershell-preview-2019.5.0\sessions\PSES-VSCode-27624-220671' -FeatureFlags @('PSReadLine')
6/13/2019 5:13:28 PM [NORMAL] - powershell.exe started, pid: 16996
6/13/2019 5:15:28 PM [NORMAL] - Language server startup failed.
6/13/2019 5:15:28 PM [ERROR] - The language service could not be started:
6/13/2019 5:15:28 PM [ERROR] - Timed out waiting for session file to appear.
6/13/2019 5:18:30 PM [NORMAL] - powershell.exe terminated or terminal UI was closed```
I suspect there is a dependency of > .NET 4.7.x, given another Server 2016 system I work on had this same issue with the in-box .NET 4.6.2 until I installed .NET 4.7.2. If this is the case, it would be nice to have this mentioned in the extension's "Details" (perhaps in "Platform support" or install instructions) if not somehow accounted for in Dependencies.
Thanks for opening an issue @brycesteel. I think your diagnosis is pretty accurate. This may actually be a PowerShellStandard bug. This appears to be an issue in the way we use .NET Standard.
If you go to ~/.vscode/extensions/ms-vscode.powershell-preview-2019.5.0/modules/PowerShellEditorServices/Start-EditorServices.ps1 you might be able to insert a Wait-Debugger and capture the LoaderExceptions output.
Issue Description
The PowerShell Preview Extension v2019.5.0 fails to load on Windows Server 2016 with .NET Framework version 4.6.2 installed with the following error:
The log output is:
This seems to be similar to #1841
I suspect there is a dependency of > .NET 4.7.x, given another Server 2016 system I work on had this same issue with the in-box .NET 4.6.2 until I installed .NET 4.7.2. If this is the case, it would be nice to have this mentioned in the extension's "Details" (perhaps in "Platform support" or install instructions) if not somehow accounted for in Dependencies.
Attached Logs
logs201906131747.zip
Environment Information
Visual Studio Code
PowerShell Information
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
The text was updated successfully, but these errors were encountered: