PowerShell / PowerShell/PowerShellEditorServices

Add-Type -AssemblyName not taken into account by the completion

Open
#637 8 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-IntelliSense Issue-Enhancement
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.

psesaddtypecomplete

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.