PowerShell / PowerShell/PowerShellEditorServices
Add-Type -AssemblyName not taken into account by the completion
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 767
- Forks
- 266
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 1
Description
I tried to look for the solution in existing tickets, but found no ticket mentioning Add-Type support.
I am using now PSES in Sublime Text with PR and recipe at: https://github.com/PowerShell/PowerShellEditorServices/pull/629#issuecomment-373787797 and I found that it is not completing .NET types loaded by Add-Type e.g.:
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.
completes only to types present in System.IO.Compression but not System.IO.Compression.FileSystem, like ZipFile.

Also trying to complete [System.IO.Compression.ZipFile]:: returns nothing. I tried adding explicit path, no effect.
Do I need to explicitly specify additional modules somewhere when starting PSES or it should pick up the Add-Type from my script?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the completion behavior in PSES using Add-Type -AssemblyName System.IO.Compression.FileSystem and the System.IO.Compression.ZipFile examples. Start by tracing the completion path for loaded .NET types. Done means completion discovers ZipFile and offers members after the type reference, with coverage for the reported cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- developer-experience, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100