-
Notifications
You must be signed in to change notification settings - Fork 519
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
Cannot get PS Extension to launch PS5.1. I have .Net 4.8.1 Installed, which is listed as a pre-requisite.
Per #5215 I tried installing older v1.100.3, which did not resolve issue.
OUTPUTS and TERMINAL error are below.
Output:
2025-09-08 12:43:08.188 [info] Restarting session... 2025-09-08 12:43:08.189 [error] Error occurred while stopping language client: Error: Client is not running and can't be stopped. It's current state is: startFailed 2025-09-08 12:43:08.249 [info] Starting 'Windows PowerShell (x64)' at: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe 2025-09-08 12:43:08.504 [info] PowerShell process started with PID: 24488 2025-09-08 12:49:41.112 [info] Language service connection closed. 2025-09-08 12:49:41.113 [info] [PSES] [Error - 12:49:41 PM] Server initialization failed. 2025-09-08 12:49:41.113 [info] [PSES] Message: Pending response rejected since connection got disposed Code: -32097 2025-09-08 12:49:41.113 [info] [PSES] [Error - 12:49:41 PM] Connection to PowerShell Editor Services (the Extension Terminal) was closed. See below prompt to restart! 2025-09-08 12:49:41.113 [info] [PSES] [Error - 12:49:41 PM] PowerShell Editor Services Client client: couldn't create connection to server. 2025-09-08 12:49:41.113 [info] [PSES] Message: Pending response rejected since connection got disposed Code: -32097 2025-09-08 12:49:41.113 [error] Never finished startup! 2025-09-08 12:49:42.428 [warning] PowerShell process terminated or Extension Terminal was closed, PID: 24488
Terminal Error
Exception encountered starting EditorServices. Exception logged in C:__w\1\s\src\PowerShellEditorServices.Hosting\Commands\StartEditorServicesCommand.cs on line 243 in EndProcessing: DryIoc.ContainerException: code: Error.UnableToFindCtorWithAllResolvableArgs; message: Unable to find most resolvable constructor also including passed input arguments `` when resolving: Singleton OmniSharp.Extensions.JsonRpc.Connection {DryIoc.IfUnresolved.ReturnDefault} as parameter "connection" FactoryId=64 (IsSingletonOrDependencyOfSingleton) in resolution root Singleton OmniSharp.Extensions.LanguageServer.Server.LanguageServer FactoryId=156 (IsSingletonOrDependencyOfSingleton, IsResolutionCall) from container without scope with Rules with {TrackingDisposableTransients, ResolveIEnumerableAsLazyEnumerable, SelectLastRegisteredFactory} and without {ThrowOnRegisteringDisposableTransient, VariantGenericTypesInResolvedCollection} with DefaultReuse=Scoped {Lifespan=100} with FactorySelector=SelectLastRegisteredFactory with Made={FactoryMethod=ConstructorWithResolvableArgumentsIncludingNonPublic}. at DryIoc.Throw.For[T](Boolean throwCondition, Int32 error, Object arg0, Object arg1, Object arg2, Object arg3) at DryIoc.FactoryMethod.MostResolvableConstructor(Request request, BindingFlags additionalToPublicAndInstance, Func3 condition)
at DryIoc.ReflectionFactory.CreateExpressionOrDefault(Request request)
at DryIoc.Factory.GetExpressionOrDefault(Request request)
at DryIoc.ReflectionFactory.CreateExpressionOrDefault(Request request)
at DryIoc.Factory.GetExpressionOrDefault(Request request)
at DryIoc.Container.ResolveAndCache(Int32 serviceTypeHash, Type serviceType, IfUnresolved ifUnresolved)
at DryIoc.Container.DryIoc.IResolver.Resolve(Type serviceType, IfUnresolved ifUnresolved)
at DryIoc.Resolver.Resolve[TService](IResolver resolver, IfUnresolved ifUnresolved)
at OmniSharp.Extensions.LanguageServer.Server.LanguageServer.d__37.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerShell.EditorServices.Server.PsesLanguageServer.d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerShell.EditorServices.Hosting.EditorServicesRunner.d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerShell.EditorServices.Commands.StartEditorServicesCommand.EndProcessing()`
PowerShell Version
Note, PS7+ runs fine. it is 5.x that won't start in VS Code.
Name Value
---- -----
PSVersion 7.5.2
PSEdition Core
GitCommitId 7.5.2
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Name : ConsoleHost
Version : 7.5.2
InstanceId : 27620882-7cef-4ef4-9955-d808df77e687
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-US
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace
Name Value
---- -----
PSVersion 5.1.26100.4768
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.26100.4768
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Name : ConsoleHost
Version : 5.1.26100.4768
InstanceId : 73a71cb2-48e9-41ef-a56d-a5817af79715
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-US
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace
Visual Studio Code Version
1.100.3
258e40fedc6cb8edf399a463ce3a9d32e7e1f6f3
x64
Also was running on 1.103.2 Latest. Neither work.
Extension Version
Steps to Reproduce
Ctrl+Shift+P; Select Powershell: Show Session Menu: Select Windows PowerShell (x64)
Visuals
No response
Logs
Output:
2025-09-08 12:43:08.188 [info] Restarting session... 2025-09-08 12:43:08.189 [error] Error occurred while stopping language client: Error: Client is not running and can't be stopped. It's current state is: startFailed 2025-09-08 12:43:08.249 [info] Starting 'Windows PowerShell (x64)' at: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe 2025-09-08 12:43:08.504 [info] PowerShell process started with PID: 24488 2025-09-08 12:49:41.112 [info] Language service connection closed. 2025-09-08 12:49:41.113 [info] [PSES] [Error - 12:49:41 PM] Server initialization failed. 2025-09-08 12:49:41.113 [info] [PSES] Message: Pending response rejected since connection got disposed Code: -32097 2025-09-08 12:49:41.113 [info] [PSES] [Error - 12:49:41 PM] Connection to PowerShell Editor Services (the Extension Terminal) was closed. See below prompt to restart! 2025-09-08 12:49:41.113 [info] [PSES] [Error - 12:49:41 PM] PowerShell Editor Services Client client: couldn't create connection to server. 2025-09-08 12:49:41.113 [info] [PSES] Message: Pending response rejected since connection got disposed Code: -32097 2025-09-08 12:49:41.113 [error] Never finished startup! 2025-09-08 12:49:42.428 [warning] PowerShell process terminated or Extension Terminal was closed, PID: 24488
Terminal Error
Exception encountered starting EditorServices. Exception logged in C:__w\1\s\src\PowerShellEditorServices.Hosting\Commands\StartEditorServicesCommand.cs on line 243 in EndProcessing: DryIoc.ContainerException: code: Error.UnableToFindCtorWithAllResolvableArgs; message: Unable to find most resolvable constructor also including passed input arguments `` when resolving: Singleton OmniSharp.Extensions.JsonRpc.Connection {DryIoc.IfUnresolved.ReturnDefault} as parameter "connection" FactoryId=64 (IsSingletonOrDependencyOfSingleton) in resolution root Singleton OmniSharp.Extensions.LanguageServer.Server.LanguageServer FactoryId=156 (IsSingletonOrDependencyOfSingleton, IsResolutionCall) from container without scope with Rules with {TrackingDisposableTransients, ResolveIEnumerableAsLazyEnumerable, SelectLastRegisteredFactory} and without {ThrowOnRegisteringDisposableTransient, VariantGenericTypesInResolvedCollection} with DefaultReuse=Scoped {Lifespan=100} with FactorySelector=SelectLastRegisteredFactory with Made={FactoryMethod=ConstructorWithResolvableArgumentsIncludingNonPublic}. at DryIoc.Throw.For[T](Boolean throwCondition, Int32 error, Object arg0, Object arg1, Object arg2, Object arg3) at DryIoc.FactoryMethod.MostResolvableConstructor(Request request, BindingFlags additionalToPublicAndInstance, Func3 condition)
at DryIoc.ReflectionFactory.CreateExpressionOrDefault(Request request)
at DryIoc.Factory.GetExpressionOrDefault(Request request)
at DryIoc.ReflectionFactory.CreateExpressionOrDefault(Request request)
at DryIoc.Factory.GetExpressionOrDefault(Request request)
at DryIoc.Container.ResolveAndCache(Int32 serviceTypeHash, Type serviceType, IfUnresolved ifUnresolved)
at DryIoc.Container.DryIoc.IResolver.Resolve(Type serviceType, IfUnresolved ifUnresolved)
at DryIoc.Resolver.Resolve[TService](IResolver resolver, IfUnresolved ifUnresolved)
at OmniSharp.Extensions.LanguageServer.Server.LanguageServer.d__37.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerShell.EditorServices.Server.PsesLanguageServer.d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerShell.EditorServices.Hosting.EditorServicesRunner.d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerShell.EditorServices.Commands.StartEditorServicesCommand.End