Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Microsoft.Powershell.Sdk - Script hangs when running from runtime-specific published binary #16901

Copy link
Copy link
@genriquez

Description

@genriquez
Issue body actions

Prerequisites

Steps to reproduce

  • Unzip test project to some folder
  • Publish binaries dotnet publish PwshTest.csproj -o .\publish --configuration Release --runtime win10-x64
  • Run PwshTest.exe

Expected behavior

Application exits

Actual behavior

Application hangs

Error details

Seems that creating an instance of WScript.Shell is causing the PS sdk library to hang (looping, since there is cpu usage going on). This is specific to using the --runtime parameter on publish. Publishing without specifying runtime does not hang, and running from sources in Debug and Release does not hang either. Removing creation of WScript.Shell from the script file makes it pass without issues.

Tested in SDK 7.1.5, the latest release for Net5 applications.

Environment data

<TargetFramework>net5.0-windows10.0.19041</TargetFramework>
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.1.5" />

Visuals

Test solution and script: PwshTest.zip

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aNeeds-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.Resolution-AnsweredThe question is answered.The question is answered.WG-DevEx-SDKhosting PowerShell as a runtime, PowerShell's APIs, PowerShell Standard, or development of moduleshosting PowerShell as a runtime, PowerShell's APIs, PowerShell Standard, or development of modules

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.