Skip to content

refactor: reuse matching .NET Desktop Runtime instead of bundling it #50

Description

@hyjd1314

背景\n\n当前安装器以 self-contained 方式发布,安装包仍包含 .NET 运行时。即使目标机器已有兼容的 .NET Windows Desktop Runtime,也无法复用,导致包体积和重复部署成本偏高。\n\n## 目标\n\n- 发布为 framework-dependent win-x64 应用,不把 .NET 运行时复制进安装包。\n- 在安装或首次启动时检测目标机器是否已有满足最低版本的 Microsoft.WindowsDesktop.App x64 运行时。\n- 已存在兼容运行时时直接启动,不下载、不重复安装。\n- 缺失或版本不匹配时给出友好、明确、可访问的提示,说明需要 .NET Desktop Runtime、目标版本、架构及官方安装入口。\n- 不绕过 Windows 或浏览器安全确认;安装运行时仍由用户确认。\n- 保持 Python 受控按需运行时与系统 Python 不自动回退的约束。\n\n## 验收\n\n- 安装包不再包含 CoreCLR / hostfxr / WindowsDesktop runtime 文件,体积显著下降。\n- 已安装匹配运行时的新机器可直接启动,无下载动作。\n- 缺失运行时的机器在启动前获得可操作提示,不出现晦涩的宿主错误。\n- x86、仅有旧版、仅有基础 Microsoft.NETCore.App 等不兼容情形均被准确区分。\n- 自动化测试覆盖检测、版本比较、用户提示和打包产物检查。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions