You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VS2022 WPF离线安装包制作:手动下载的依赖无法被识别

为WPF项目制作离线安装程序时依赖包无法被VS2022识别的问题

我正尝试使用Visual Studio 2022的Microsoft Visual Studio Installer插件为WPF项目制作离线安装程序,但手动下载的依赖包始终无法被识别。

我曾参考资料将对应包放置在Microsoft SDK -> ClickOnce Bootstrapper -> Packages的对应文件夹中,自认为操作正确。

以下是安装项目的属性窗口截图:
安装项目属性窗口

VS2022给出的错误信息如下:

ERROR: To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'net6coreruntime_x64\dotnet-runtime-6.0.15-win-x64.exe' for item '.NET Runtime 6.0.15 (x64)' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=616018.
ERROR: To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'net6coreruntime_x86\dotnet-runtime-6.0.15-win-x86.exe' for item '.NET Runtime 6.0.15 (x86)' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=616018.
ERROR: To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'net6desktopruntime_x64\windowsdesktop-runtime-6.0.15-win-x64.exe' for item '.NET Desktop Runtime 6.0.15 (x64)' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=616018.
ERROR: To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'net6desktopruntime_x86\windowsdesktop-runtime-6.0.15-win-x86.exe' for item '.NET Desktop Runtime 6.0.15 (x86)' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=616018.
ERROR: General failure building bootstrapper

我严格按照错误信息中的文件夹名和文件名放置文件,例如第一个错误对应的文件夹为net6coreruntime_x64,文件为dotnet-runtime-6.0.15-win-x64.exe。

我将这些文件放置在以下路径中,但均无效:

  • C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\DotNetFX472
  • C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\DotNetFX472\en
  • C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\vcredist_x64
  • C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\vcredist_x64\en
    同时也放置在了项目文件夹中。

所有操作均未解决问题,恳请提供帮助。

提前致谢,
Matt


内容的提问来源于stack exchange,提问作者thisisausername2

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.19 20:23:08