WiX的安装程序不VS 2012上工作

编程入门 行业动态 更新时间:2024-10-28 06:34:54
本文介绍了WiX的安装程序不VS 2012上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我要创建我的应用程序一个安装的安装程序。我已经下载的WiX 3.6和它安装在VS 2012。

I want to create a setup installer for my application. I have downloaded WiX 3.6 and installed it on vs 2012.

  • 创建简单的WinForm应用程序
  • 添加维克斯安装项目,以我的解决方案
  • 右键点击引用,我的WinForm应用程序添加到设置的参考
  • 我建立的解决方案并进入调试目录设置项目并运行SetupProject1.exe.msi它不工作并关闭安装程序对话框中没有任何错误。
  • Create simple winform application
  • Add WiX setup project to my solution
  • Right click on reference and add my winform application to setup's reference
  • I build solution and go to debug directory in setup project and run SetupProject1.exe.msi it does not work and closes the installer dialog without any error.
  • 返回设定项目

  • 右键单击安装项目,然后选择属性
  • 在安装选项卡>输出类型,将其更改为executablefile.exe
  • 构建它,去调试和运行SetupProject1.exe - 仍然不能正常工作
  • 什么是错的?这是我的安装项目product.wxs

    What is wrong? This is my setup project product.wxs

    <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="schemas.microsoft/wix/2006/wi"> <Product Id="*" Name="SetupProject1" Language="1033" Version="1.0.0.0" Manufacturer="Natiloos" UpgradeCode="cfc2f4dd-2da5-49e2-9099-96968d75aaa4"> <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> <MediaTemplate /> <Feature Id="ProductFeature" Title="SetupProject1" Level="1"> <ComponentGroupRef Id="ProductComponents" /> </Feature> </Product> <Fragment> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLFOLDER" Name="SetupProject1" /> </Directory> </Directory> </Fragment> <Fragment> <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. --> <!-- <Component Id="ProductComponent"> --> <!-- </Component> --> </ComponentGroup> </Fragment>

    我怎样才能让安装程序正确建立?

    How can I get the installer to build correctly?

    推荐答案

    问题是您的安装不安装任何东西。添加您的项目作为安装程序的引用,并不意味着安装程序将包括您的项目输出。在您的安装项目有:

    The problem is your installer is not installing anything. Adding your project as a reference to the installer does not mean the installer will include your projects output. In your setup project you have:

    <Fragment> <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. --> <!-- <Component Id="ProductComponent"> --> <!-- </Component> --> </ComponentGroup> </Fragment>

    您需要添加文件...即。取消注释<成分>< /成分> 标签和手动添加文件。这是很好的有一个<成分>每个文件标签

    You need to add the files...i.e. uncomment the <Component></Component> tags and add your files manually. It's good to have one <Component> tag per file.

    例如:

    <Component Id="MyProgram.exe" Guid="PUT-GUID-HERE"> <File Id="MyProgram.exe" KeyPath="yes" Source="Path_To_Output_Folder\MyProgram.exe" /> </Component>

    更多推荐

    WiX的安装程序不VS 2012上工作

    本文发布于:2023-11-13 01:24:48,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1583027.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:安装程序   工作   WiX

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!