Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

PowerShell extension fails to start / crash on Windows PowerShell 5.1 with .NET Runtime error

Aperta
#5,608 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
powershell, typescript

Direzione di ricerca

The issue is a crash in PowerShell Editor Services on Windows PowerShell 5.1 with a .NET Runtime error. Start by examining the extension logs and the Windows Event Viewer details (Event ID 1022, HRESULT 0x80004005). Look at the initialization code in the PowerShell extension, likely in the language server or session startup. Reproduce the crash locally to capture more logs. 'Done' is identifying the root cause of the .NET Runtime failure and proposing a fix.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Issue-Bug Needs: Triage
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

When launching Visual Studio Code or activating the PowerShell extension, the PowerShell extension (PowerShell Editor Services) fails to start the integrated terminal session and prompts to report an issue.

Checking the Windows Event Viewer around the time of the crash showed a .NET Runtime failure:

  • Event ID: 1022 (.NET Runtime version 4.0.30319.0, HRESULT: 0x80004005)
    The PowerShell host session failed to initialize properly.
PowerShell Version
Name                           Value                                                                                   
----                           -----                                                                                   
PSVersion                      5.1.26100.9502                                                                          
PSEdition                      Desktop                                                                                 
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
BuildVersion                   10.0.26100.9502                                                                         
CLRVersion                     4.0.30319.42000                                                                         
WSManStackVersion              3.0                                                                                     
PSRemotingProtocolVersion      2.3                                                                                     
SerializationVersion           1.1.0.1
Visual Studio Code Version
1.107.0
x64
Extension Version
ms-vscode.powershell@2025.4.0
Steps to Reproduce
  1. Open Visual Studio Code (v1.107.0 on Windows 11).
  2. Activate the PowerShell extension (ms-vscode.powershell v2025.4.0).
  3. The extension attempts to start using default Windows PowerShell 5.1 (Desktop edition).
  4. The extension fails to initialize/crashes, and a notification prompts to report the issue.
Visuals

No response

Logs

No response

Lingua principale
TypeScript
Stelle
1.9k
Fork
548
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PowerShell/vscode-powershell

Tutte le issue di PowerShell/vscode-powershell

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.