Repository navigation
Description
Prerequisites
- I have written a descriptive issue title.
- I have searched all open and closed issues to ensure it has not already been reported.
- I have read the troubleshooting guide.
- I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
- I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
- If this is a security issue, I have read the security issue reporting guidance.
Summary
Prerequisites
- I have reproduced the issue consistently.
- PowerShell itself starts normally.
- PowerShell Editor Services starts successfully when the missing assembly is explicitly preloaded.
Environment
- Windows: Microsoft Windows 10.0.26300 x64
- Visual Studio Code: 1.147.0 x64
- PowerShell extension: ms-vscode.powershell@2026.1.2
- PowerShell: 7.6.10
- PSEdition: Core
- .NET runtime: 10.0.15
- PSHOME: C:\Program Files\PowerShell\7
- LanguageMode: FullLanguage
Problem
The PowerShell extension starts pwsh.exe successfully, but PowerShell Editor Services fails to start.
VS Code eventually reports:
PowerShell Language Server process didn't start!
The underlying EditorServices exception is:
System.IO.FileNotFoundException:
Could not load file or assembly
'Microsoft.Extensions.Logging.Abstractions, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=adb9793829ddae60'.
The system cannot find the file specified.
at Microsoft.PowerShell.EditorServices.Hosting.EditorServicesRunner.CreateEditorServicesAndRunUntilShutdown()
at Microsoft.PowerShell.EditorServices.Hosting.EditorServicesRunner.RunUntilShutdown()
at Microsoft.PowerShell.EditorServices.Commands.StartEditorServicesCommand.EndProcessing()
Important observation
Microsoft.Extensions.Logging.Abstractions.dll is present in the installed PowerShell extension.
The assembly can also be loaded successfully manually.
I locate and preload it using:
$extension = Get-ChildItem `
-LiteralPath "$env:USERPROFILE\.vscode\extensions" `
-Directory |
Where-Object Name -Like 'ms-vscode.powershell-2026.1.2*' |
Sort-Object LastWriteTim* -Descending |
Select-*bject -First 1
$dll = Get-ChildIt*m `
-LiteralPath $extension.Fu*lName `
-Recurse `
-File `* -Filter 'Microsoft.Extensions.*ogging.Abstractions.dll' |
Whe*e-Object {
[Reflection.AssemblyName]::GetAssemblyName($_.Full*ame).Version -eq
[version]'10.0.0.0'
} |
Select-O*ject -First 1
[void][System.Runtime.Loader.AssemblyLoadContext]::Def*ult.LoadFromAssemblyPath(
$dll*FullName
)This succeeds.
##* Reproduction / diagnostic result
If I then start PowerShell Editor ervices manually in the SAME Powerhell process it starts correctly.
The generatd session file contains
{
"status": "started*,
"languageServiceTransport": *NamedPipe",
"languageService*ipeName": "\\\\.\\pipe\\PSES_4qmli*hj*kvu",
"powerShellVersion": "7.*.10*
}The EditorServices diagnosic output ends successfully with:
```text
VERBOSE: Starting PowerShel Editor Services
DEBUG: Creating/unning editor services
DEBUG: Creaing startup info object
VERBOSE: PES Startup Completed. Starting Lanuage Server.
VERBOSE: Please checkthe LSP log file in your client fo* further messages.
Without ex*licitly preloading `Microsoft.Exte*sions.Logging.Abstractions.dll`, E*itorServices fails with the FileNo*FoundException shown above.
### A*ditional testing
I previously rep*oduced the same behavior with Powe*Shell extension 2025.4.0 / PowerSh*ll Editor Services 4.4.0.
In that*version the missing dependency was*
```text
Microsoft.Extensions.Log*ing.Abstractions, Version=9.0.0.0
*``
The DLL was present in:
```te*t
modules\PowerShellEditorServices*bin\Common\Microsoft.Extensions.Lo*ging.Abstractions*dll
Its identity was verified*as:
FullName:
Microsoft.E*tensions.Logging.Abstractions, Ver*ion=9.0.0.0,
Culture=neutral, Publ*cKey*oken=*db9793829ddae60
AssemblyVersion: *.0.0.0
FileVersion: 9.0.825.36511
*``
Again, explicitly preloading t*e DLL made EditorServices start su*cessfully.
PowerShell extension 2*25.2.0 was also tested and did not*resolve the startup problem.
### *xpected behavior
The PowerShell e*tension should start PowerShell Ed*tor Services normally with PowerSh*ll 7.6.10 without requiring its bu*dled `Microsoft.Extensions.Logging*Abstractions` assembly to be manua*ly preloaded.
### Actual behavior*
`pwsh.exe` starts, but EditorServ*ces cannot resolve `Microsoft.Exte*sions.Logging.Abstractions` automa*ically. As a result, the session d*tails file is not created and VS C*de eventually reports that the Pow*rShell Language Server process did*not start.
### Suspected area
Th*s appears related to assembly depe*dency resolution / AssemblyLoadCon*ext handling during `Start-EditorS*rvices`.
The fact that preloading*the exact bundled*assembly into `AssemblyLoadContext*Default`*immediately allows EditorServices *o start may be useful for diagnosi*g the issue.
### PowerShell Version
```console
Name Value
---- -----
PSVersion 7.6.10
PSEdition Core
GitCommitId 7.6.10
OS Microsoft Windows 10.0.26300
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.4
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Name : ConsoleHost
Version : 7.6.10
InstanceId : 8ae0546c-6153-4f38-90af-2b35669f2ead
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : nl-BE
CurrentUICulture : nl-NL
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace
Visual Studio Code Version
1.147.0
8a14f0cc1b08d531eb83255ea3764ae22aa932b5
x64Extension Version
ms-vscode.powershell@2026.1.2Steps to Reproduce
-
Install PowerShell 7.6.10.
-
Install the PowerShell extension:
ms-vscode.powershell@2026.1.2 -
Configure the extension to use:
C:\Program Files\PowerShell\7\pwsh.exe -
Open a
.ps1file in VS Code. -
Wait for the PowerShell language server to start.
-
The language server fails to start. The PowerShell output eventually reports:
PowerShell Language Server process didn't start! -
The underlying
Start-EditorServicesexception is:System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. -
Verify that the requested assembly is actually present in the installed extension:
Get-ChildItem "$env:USERPROFILE\.vscode\extensions\ms-vscode.powershell-2026.1.2*" ` -Re*urse ` -Filter 'Microsoft.E*tensions.Logging.Abstractions.dll'* ```
9.Start a clean PowerShell 7.6.10session and manually preload the bndled assembly
$extension =*Get-ChildItem `
* -LiteralPath "$env:USERPROFI*E\.vscode\extensions" `
-Di*ectory |
Where-Object Name *Like 'ms-vscode.powershell-2026.1.2*' |
Select-Object -First 1
$dll = Get-ChildItem `
-LiteralPath $extension.FullName `
-Recurse `
-File `
-Filter 'Microsoft.Extensions.Logging.Abstractions.dll' |
Where-Object {
[Reflection.AssemblyName]::GetAssemblyName($_.FullName).Version -eq
[version]'10.0.0.0'
} |
Select-Object -First 1
[void][System.Runtime.Loader.AssemblyLoadContext]::Default.LoadFromAssemblyPath(
$dll.FullName
)-
In the same PowerShell process, start PowerShell Editor Services manually.
-
EditorServices now starts successfully and creates a session file containing:
{
"status": "started",
"languageServiceTransport": "
### Visuals
_No response_
### Logs
_No response_
Activity