Wix Toolset 打包安装包

基于visual studio(以Visual Studio 2015为例), 使用Wix Toolset打包程序

安装Wix Toolset extension

工具-》扩展和更新, 搜索Wix ,找到extension 进行安装

打包

  • 创建工程
    新建-》项目 -》Wix Toolset -> V3 -> Setup Project for Wix v3, 创建打包工程。将会生成工程文件和Product.wxs, 根据实际项目,修改Product.wxs。

常见错误

  • Unresolved reference to symbol 'WixUI:WixUI_InstallDir' in section 'Product:*'.
    原因:
    Product.wxs添加以下配置后引起的:
     <!-- 定义 UI 并引用安装目录选择对话框 -->
     <UIRef Id="WixUI_InstallDir" />
     <Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
    
    解决方案:
     右键项目-》添加-》引用, 找到WixUIExtension.dll 进行添加
    
  • This 32BitComponent testComponent uses 64BitDirectory INSTALLFOLDER
    解决方案:
组件定义的时候,需要指定Win64, Platform="x64"
如:Component Id="testComponent" Guid="*" Win64="yes">

posted on 2025-06-13 18:31  洛苏  阅读(336)  评论(0)    收藏  举报

导航