Skip to content

PowerShell extension fails to execute project commands correctly on VS Code 1.135.0 #5614

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

Summary

I am investigating an unexpected behavior involving the PowerShell extension in Visual Studio Code.

The issue is being observed in a Windows environment using PowerShell 7.6.6, VS Code 1.135.0 (x64), and PowerShell extension 2025.4.0.

I am providing the complete environment information and reproduction details below so the behavior can be diagnosed and the root cause can be isolated.

No assumptions are being made about whether the root cause is PowerShell, VS Code, the PowerShell extension, or the project environment.

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.6.6
PSEdition                      Core
GitCommitId                    7.6.6
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0.}
PSRemotingProtocolVersion      2.4
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

1.135.0
x64

Extension Version

ms-vscode.powershell@2025.4.0

Steps to Reproduce

Steps to Reproduce

  1. Start Visual Studio Code 1.135.0 (x64).
  2. Open the affected PowerShell project/workspace.
  3. Ensure the PowerShell extension ms-vscode.powershell version 2025.4.0 is enabled.
  4. Start a PowerShell session using PowerShell 7.6.6.
  5. Execute the command that triggers the problem.
  6. Observe the resulting behavior.
  7. Repeat the operation in a new VS Code window/session to determine whether the behavior is persistent.
  8. Compare the result with the same command executed directly from a standalone PowerShell 7.6.6 terminal.

Visuals

Actual Behavior

The observed behavior is:

[DESCRIBE THE EXACT ERROR OR UNEXPECTED RESULT HERE]

Observed error message:

[PASTE THE EXACT ERROR MESSAGE HERE]

### Logs

## Logs

### PowerShell Environment

```powershell
$PSVersionTable | Format-List *

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugA bug to squash.Needs: TriageMaintainer attention needed!

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions