[WPF]VS2019打包WPF程序

原文链接:http://www.cnblogs.com/lizhenghao126/p/11053599.html

准备打包

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

可能遇到错误

在“系统必备”对话框中启用“从与我的应用程序相同的位置下载系统必备组件”,必须将“Microsoft .NET Framework4.5.2 (x86 和 x64)”项的文件“DotNetFX452\NDP452-KB2901907-x86-x64-AllOS-ENU.exe”下载到本地计算机

解决办法

  1. 下载.net框架,地址:英文版本地址 —— 中文版本地址(注意版本)
  2. 将 NDP461-KB3102436-x86-x64-AllOS-ENU.exe 复制到
    C:\Program Files(x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\DotNetFX461
  3. 将 NDP461-KB3102436-x86-x64-AllOS-CHS.exe 复制到
    C:\ProgramFiles(x86)\MicrosoftSDKs\ClickOnceBootstrapper\Packages\DotNetFX461\zh-Hans

转载于:https://www.cnblogs.com/lizhenghao126/p/11053599.html

展开阅读全文
博主设置当前文章不允许评论。

WPF应用打包失败

05-02

最近第一次用WPF开发一个windows桌面应用,应用开发完成,打包的时候出现以下问题。rnrnrn1>------ 已启动全部重新生成: 项目: ExcelFill, 配置: Release Any CPU ------rn1> ExcelFill -> D:\winworkspace\ExcelFill\ExcelFill\bin\Release\ExcelFill.exern------ Starting pre-build validation for project 'ExcelFillSetup' ------ rn------ Starting pre-build validation for project 'ExcelFillSetup' ------ rn------ Starting pre-build validation for project 'ExcelFillSetup' ------ rn.rn.rn.rnBuilding file 'D:\winworkspace\ExcelFill\ExcelFillSetup\Release\ExcelFillSetup.msi'...rnBuilding file 'D:\winworkspace\ExcelFill\ExcelFillSetup\Release\ExcelFillSetup.msi'...rnBuilding file 'D:\winworkspace\ExcelFill\ExcelFillSetup\Release\ExcelFillSetup.msi'...rnERROR: File 'IBM.Data.DB2.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'rnERROR: File 'IBM.Data.DB2.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'rnERROR: File 'IBM.Data.DB2.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'rnWARNING: File 'IBM.Data.DB2.dll' targeting 'x64' is not compatible with the project's target platform 'x86'rnWARNING: File 'IBM.Data.DB2.dll' targeting 'x64' is not compatible with the project's target platform 'x86'rnWARNING: File 'IBM.Data.DB2.dll' targeting 'x64' is not compatible with the project's target platform 'x86'rnBuild process cancelledrn========== 全部重新生成: 成功 1 个,失败 1 个,跳过 0 个 ==========rnrn然而我的要制作安装包的目标平台设置的是x64啊,弄了半天了,好痛苦,求解!rn[img=https://img-bbs.csdn.net/upload/201805/02/1525242152_711974.png][/img]rnrn 论坛

没有更多推荐了,返回首页