PowerShell / PowerShell/PowerShellEditorServices
Add-Type -AssemblyName not taken into account by the completion
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 767
- 派生
- 266
- 平均合并
- 3 天 16 小时
- 30 天内合并 PR
- 1
描述
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?
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用 Add-Type -AssemblyName System.IO.Compression.FileSystem 和 System.IO.Compression.ZipFile 示例重现 PSES 中的补全行为。首先跟踪已加载 .NET 类型的补全路径。完成的标准是补全能够发现 ZipFile,并在类型引用之后提供成员,同时覆盖已报告的情况。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp, powershell
- 领域
- developer-experience, devtools
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100