Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Auto-detect PackageDependencies from installer PE import table

未关闭
#676 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
55/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
csharp
领域
cli

调研方向

从 winget-create 的安装程序下载和生成清单流程开始,然后阅读提议的 System.Reflection.PortableExecutable.PEReader API。定义导入的 DLL 和 PE 架构如何映射到 PackageDependencies,并决定生成过程应自动添加依赖项还是提示确认。完成标准是能够可靠地匹配 VCRedist 和 .NET 导入,同时不影响非 PE 安装程序。

由索引模型根据 Issue 内容生成。

描述

Issue-Feature
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

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/winget-create 的其他 Issue

查看 microsoft/winget-create 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。