WiX 构建警告:媒体表没有条目

发布于 2024-12-27 08:28:24 字数 1543 浏览 3 评论 0原文

我正在尝试为 WiX 中的 .net 应用程序创建一个简单的安装程序。我安装了 Votive 并使用它创建的基本模板 wxs 文件。当我编译它时,我收到警告 LGHT1076:ICE71:媒体表没有条目。

此外,当我运行安装程序时,它会在安装过程中启动并消失,并且“添加/删除程序”应用程序中没有任何条目。

这是 XML:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="26d654fe-af0f-4b48-8993-8e249597a130" 
       Name="Minefold" 
       Language="1033" 
       Version="0.0.0.1" 
       Manufacturer="Minefold" 
       UpgradeCode="6aad5a10-cbbe-472b-87fc-0813fb450836">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate />
</Product>

<Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
            <Directory Id="INSTALLFOLDER" Name="Minefold" />
        </Directory>
    </Directory>
</Fragment>

<Fragment>
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
         <Component Id="ProductComponent">
     <File Source="C:\code\Minefold\Minefold\bin\Debug\Minefold.exe" Id="Minefold.exe"  />
         </Component> 
    </ComponentGroup>
</Fragment>

<Fragment>
  <Feature Id="Application" Title="Minefold" Level="1">
    <ComponentRef Id="ProductComponent" />
  </Feature>
</Fragment>
</Wix>

I'm trying to create a simple installer for a .net application in WiX. I installed Votive and am using the basic template wxs file it creates. When I compile it I get warning LGHT1076: ICE71: The Media table has no entries.

Also when I run the installer it starts and disappears during installation and there is no entry in the Add/Remove Programs app.

Here's the XML:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="26d654fe-af0f-4b48-8993-8e249597a130" 
       Name="Minefold" 
       Language="1033" 
       Version="0.0.0.1" 
       Manufacturer="Minefold" 
       UpgradeCode="6aad5a10-cbbe-472b-87fc-0813fb450836">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate />
</Product>

<Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
            <Directory Id="INSTALLFOLDER" Name="Minefold" />
        </Directory>
    </Directory>
</Fragment>

<Fragment>
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
         <Component Id="ProductComponent">
     <File Source="C:\code\Minefold\Minefold\bin\Debug\Minefold.exe" Id="Minefold.exe"  />
         </Component> 
    </ComponentGroup>
</Fragment>

<Fragment>
  <Feature Id="Application" Title="Minefold" Level="1">
    <ComponentRef Id="ProductComponent" />
  </Feature>
</Fragment>
</Wix>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

十六岁半 2025-01-03 08:28:24

将带有 ComponentGroupRef 的功能添加到您的产品中。正如所写,产品与片段中的内容没有任何联系。

Add a Feature with a ComponentGroupRef to your Product. As written, nothing connects the Product with the content in the Fragments.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文