为什么WiX安装项目会生成wixlib而不是MSI?

时间:2012-10-22 17:23:31

标签: wix windows-installer visual-studio-2012

我是WIX的新手并试图创建一个MSI来安装服务。安装项目正在生成.wixlib对象而不是msi。我正在处理this example

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <!-- TODO: Put your code here. -->
<Product Name="Smart Elf Service"
       Id="*"
       UpgradeCode="927E7BBE-58C0-4832-A821-24A6B19AEE63"
       Version="1.0.0.0"
       Manufacturer="Me!"
       Language="1033">
<Package
  Manufacturer="Me!"
  InstallerVersion="100"
  Languages="1033" />
  <Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="ProgramFilesFolder" Name="Program Files(x86)">
      <Directory Id="CorporationFolder" Name="Corporation">
        <Directory Id="SmartElfFolder" Name="SmartElf Service">
          <Component Id="SmartElfService">
            <File Id="SmartElfServiceBinary" Name="ElfVerificationService.exe" Source ="..\ElfVerificationService\bin\debug\ElfVerificationService.exe" KeyPath="yes" Vital="yes"/>
            <ServiceInstall
              Id="SI_SmartElfService"
              Vital="yes"
              Name="sesvc"
              DisplayName="SmartElf Service"
              Start="auto"
              ErrorControl="normal"
              Type="ownProcess"
            />

            <ServiceControl
              Id="SC_SmartElfService"
              Name="sesvc"
              Start="install"
              Stop="both"
              Remove="uninstall"
              Wait="yes"
            />
          </Component>
        </Directory>
      </Directory>
    </Directory>
  </Directory>
<Feature Id="DefaultFeature" Level="1">
  <ComponentRef Id="SmartElfService"/>
</Feature>
</Product>
</Wix>

1 个答案:

答案 0 :(得分:4)

在解决方案资源管理器中右键单击项目,然后选择“属性”。确保输出类型设置为Windows Installer Package(.msi)。