8000 Jobs do not work in hosted PowerShell Core · Issue #7052 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Jobs do not work in hosted PowerShell Core #7052

@markekraus

Description

@markekraus

It appears that trying to run jobs inside hosted PowerShell Core from a .NET Core 2.0 app fails.
This was first noticed in Jaykul/Jupyter-PowerShell#20 But I was able to coble together a simple repro https://github.com/markekraus/TesthostedPSJobs

@Jaykul suggested I try and copy the pwsh binary to the hosted app location, but that doesn't seem to work either.

Steps to reproduce

git clone https://github.com/markekraus/TesthostedPSJobs.git
push-location TesthostedPSJobs
dotnet run

Expected behavior

No output

Actual behavior

Error: [localhost] An error occurred while starting the background process. Error reported: The system cannot find the file specified.
Exception: System.Management.Automation.Remoting.PSRemotingTransportException: An error occurred while starting the background process. Error reported: The system cannot find the file specified. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Management.Automation.Runspaces.PowerShellProcessInstance.Start()
   at System.Management.Automation.Remoting.Client.OutOfProcessClientSessionTransportManager.CreateAsync()
   --- End of inner exception stack trace ---
InnerException: System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Management.Automation.Runspaces.PowerShellProcessInstance.Start()
   at System.Management.Automation.Remoting.Client.OutOfProcessClientSessionTransportManager.CreateAsync()
InnerException:
--------------------------------------------------------

Environment data

Windows 10 x64 (I have not verified this on other OSes)
6.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution-By DesignThe reported behavior is by design.WG-Enginecore PowerShell engine, interpreter, and runtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0