PowerShellEditorServices
PowerShellEditorServices copied to clipboard
2.0.0 preview Module loading error (pb loading netstandard, Version=2.0.0.0)
Description
When trying to launch the PowerShell preview 2.0.0 in VSCode, I've got an error that I was able to pin down to the importation of the PowerShellEditorServices module. When trying to load the module by itself, there is three Add-Type errors. When trying those Add-Type manually, I've got the same errors that say Unable to load one or more of the requested types. I checked the LoaderException objects, and it seems to boil down to that message:
{System.IO.FileNotFoundException: Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
Files attached
EditorServices-reportlogs.zip contains:
- vscode-powershell.log
- Start-EditorServices-EditorServices.log (log level: diagnostic)
- Import-Module.log (manual module importation, verbose)
- LoaderException.txt (random loader exception among loads of identical ones)
@XPlantefeve what version of the .NET Framework do you have installed on your machine?
It's 4.7.02046 apparently. Taken from my registry:
PSChildName Version Release
----------- ------- -------
v2.0.50727 2.0.50727.4927
v3.0 3.0.30729.4926
Windows Communication Foundation 3.0.4506.4926
Windows Presentation Foundation 3.0.6920.4902
v3.5 3.5.30729.4926
Client 4.0.0.0
Client 4.7.02046 460798
Full 4.7.02046 460798
I believe only .Net 4.7.2 includes netstandard.dll, so PSES will need to distribute that assembly and conditionally require it if it's Windows PowerShell