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

dotnet type lookup breaks after importing SharePointServer PowerShell module

Aperta
#4,680 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Reproduce the failure in a PowerShell 5.1 session by comparing type completion before and after Import-Module SharePointServer. Start with the type-name completion path associated with TabExpansion2 and the reported completion handler error. Done means [date completes again with Tab and Ctrl+Space after the module import, while cmdlet and method completion continue to work.

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

Descrizione

Needs-Triage :mag:
Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.
Exception report
N/A
Screenshot

N/A

Environment data
PS Version: 5.1.20348.2849
PS HostName: ConsoleHost
PSReadLine Version: 2.4.1-beta1
PSReadLine EditMode: Windows
OS: 10.0.20348.1 (WinBuild.160101.0800)
BufferWidth: 120
BufferHeight: 9001
Steps to reproduce

Try to autocomplete a dotnet type after importing the SharePointServer PowerShell module.
Applies both to tab completion and selection using Ctrl + Space.

  1. Start a new PowerShell session
  2. Test type autocomplete by for example typing [date and then pressing Ctrl + Space
  3. Auto complete suggestions come up.
  4. Import module with Import-Module SharePointServer
  5. Test autocomplete with [date and then pressing Ctrl + Space
Expected behavior

Autocomplete should work both before and after importing the SharePointServer module.

Actual behavior

After the module import, autocomplete is broken for dotnet objects.
More specifically the function to complete types names is broken.
Autocomplete for Cmdlets and methods of types is working, but type name is not.

  • Typing Get-Mo and pressing Ctrl + Space gives options to complete.
  • Typing [datetime] and pressing Ctrl + Space gives method suggestions.
  • Typing [date and pressing Ctrl + Space (or pressing just Tab) gives no results.

Additonal info:
While PSReadline itself does not seem to generate a visible exception, there is some exceptions generated in VSCode with the PowerShell extension, so I'm adding it here if possibly relevant.
But the reproduction steps has been run directly in PowerShell outside of VSCode.

2025-03-25 15:01:05.940 [info] [PSES] [Error - 3:01:05 PM] <Error>Microsoft.PowerShell.EditorServices.Handlers.PsesCompletionHandler: Error Occurred in TabExpansion2 | 
2025-03-25 15:01:05.945 [info] [PSES] [Warn  - 3:01:05 PM] <Warning>Microsoft.PowerShell.EditorServices.Handlers.PsesCompletionHandler: Exception occurred while running handling completion request - System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.PowerShell.EditorServices.Handlers.PsesCompletionHandler.<GetCompletionsInFileAsync>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.Handlers.PsesCompletionHandler.<Handle>d__13.MoveNext() | 
````
Lingua principale
C#
Stelle
4.4k
Fork
341
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/PSReadLine

Tutte le issue di PowerShell/PSReadLine

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.