Import-Module: Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
with "powershell.exe" the above import-module runs without problem.
Our own scripts work, not sure if they use System.Runtime, but I think this is minimal needed to run.
I need PowerShell 7, what is missing to load the assembly System.Runtime for the PowerShellEditorServices.psd1
script ?
Prerequisites
Steps to reproduce
At vscode startup the following error is shown:
As it might be caused by "Installing the PowerShell Extension on Restricted Systems": with "pwsh.exe"
Import-Module: Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
with "powershell.exe" the above import-module runs without problem.
Our own scripts work, not sure if they use System.Runtime, but I think this is minimal needed to run.
I need PowerShell 7, what is missing to load the assembly System.Runtime for the PowerShellEditorServices.psd1 script ?
dotnet --list-runtimes Microsoft.AspNetCore.App 6.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 6.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Expected behavior
Actual behavior
Error details
No response
Environment data
Version
v2023.2.1
Visuals
No response