Auto-detect PackageDependencies from installer PE import table
还没有人认领这个 Issue。
评估
调研方向
从 winget-create 的安装程序下载和生成清单流程开始,然后阅读提议的 System.Reflection.PortableExecutable.PEReader API。定义导入的 DLL 和 PE 架构如何映射到 PackageDependencies,并决定生成过程应自动添加依赖项还是提示确认。完成标准是能够可靠地匹配 VCRedist 和 .NET 导入,同时不影响非 PE 安装程序。
由索引模型根据 Issue 内容生成。
描述
Description of the new feature / enhancement
When a package links against common runtimes like VCRedist or .NET, the
PackageDependencies field must be filled in manually. There's no tooling
to catch missing dependencies, so publishers often omit them unknowingly
and only find out during PR review when a maintainer flags it causing
unnecessary roundtrips.
winget-create already downloads the installer/executable, so it has everything it
needs to detect this automatically.
Proposed technical implementation details
After downloading the installer, if it's a PE binary (.exe/.dll), parse
its import table using System.Reflection.PortableExecutable.PEReader
and match imported DLLs against a known mapping:
| Imported DLL | WinGet Package |
|---|---|
VCRUNTIME140.dll |
Microsoft.VCRedist.2015+.x64 |
MSVCP140.dll |
Microsoft.VCRedist.2015+.x64 |
VCRUNTIME140.dll (x86 binary) |
Microsoft.VCRedist.2015+.x86 |
MSVCP140.dll (x86 binary) |
Microsoft.VCRedist.2015+.x86 |
VCRUNTIME140_1.dll |
Microsoft.VCRedist.2015+.x64 |
If a match is found, either auto-populate PackageDependencies in the
generated manifest, or prompt the user to confirm before adding it.
This came up during a winget-pkgs PR review (microsoft/winget-pkgs#389270)
where a reviewer had to manually flag a missing VCRedist dependency.
- 主要语言
- C#
- 星标
- 651
- 派生
- 114
- 平均合并
- 10 小时 37 分钟
- 30 天内合并 PR
- 2
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/winget-create 的其他 Issue
-
Issue-Docs Needs-Triage
难度 2/5 1-3 小时 新手友好度 72/100
microsoft/winget-create#705 ·
-
Issue-Feature Needs-Triage
难度 2/5 1-3 小时 新手友好度 65/100
microsoft/winget-create#680 ·
-
Needs-Triage
难度 3/5 1-2 天 新手友好度 68/100
microsoft/winget-create#706 ·
-
Issue-Feature Needs-Triage
难度 4/5 3-5 天 新手友好度 52/100
microsoft/winget-create#701 ·
-
Issue-Feature Needs-Triage
难度 3/5 1-2 天 新手友好度 68/100
microsoft/winget-create#700 ·
查看 microsoft/winget-create 的全部 Issue
相似的 Issue
-
[Simple] NavigationBar primary commands do not render AppBarButton.Content when it is a UIElement未关闭control/navigationbar kind/bug triage/untriaged
难度 2/5 1-3 小时 新手友好度 90/100
unoplatform/uno.toolkit.ui#1652 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
microsoft/copilot-camp#1053 ·
维护者通常 1 天内回复
-
bug effort:S P3
难度 2/5 1-3 小时 新手友好度 84/100
nightscout/nocturne#1861 ·
维护者通常 1 天内回复
-
agentic-workflows area/Docs partner/agentic-workflows
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/fluentui-blazor#5364 ·
维护者通常 1 天内回复