gpt4 book ai didi

visual-studio - 为什么wix项目会出错?

转载 作者:行者123 更新时间:2023-12-04 19:02:40 31 4
gpt4 key购买 nike

我正在使用 Wix 工具集 3.8,并尝试创建一个 msi 项目。在构建时,我有一个这样的错误:

Severity    Code    Description Project File    Line
Error '.', hexadecimal value 0x00, is an invalid character. Analyzer light.exe 0

有没有人遇到过这样的问题?任何帮助将不胜感激!我是这个领域的初学者......
这是源代码:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?define ProductName="Traffic_Analyzer" ?>
<?define ProductVersion="1.0.0.0" ?>
<?define ProductCode="*"?>
<?define UpgradeCode="9e36a864-f98e-446a-b2e6-dd77567a4031"?>
<?define Manufacturer="Leanenka_Dzianis"?>
<?define licenseRtf="C:\Users\DzianisL\Desktop\license.rtf"?>

<Product Id="$(var.ProductCode)" Name="$(var.ProductName)" Language="1049" Version="$(var.ProductVersion)"
Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<!--1033 on 1049 - Russian language maintaines-->
<Package InstallerVersion="200" Compressed="yes" />

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

<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLLOCATION" Name="$(var.ProductName)">

<Component Id="ProductComponent" Guid="*">
<File Id='Sniffer' DiskId='1' Source='C:\Users\DzianisL\Documents\Visual Studio 2015\Projects\Sniffer\Sniffer\bin\Release\Sniffer.exe'/>
</Component>
</Directory>
</Directory>

<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="$(var.ProductName)">
<Component Id="ApplicationShortcutSniffer" Guid="4CEBD68F-E933-47f9-B02C-A4FC69FDB551">
<Shortcut Id="ShortcutSniffer"
Name="Sniffer"
Description="$(var.ProductName)"
Target="[INSTALLLOCATION]Sniffer.exe"
WorkingDirectory="INSTALLLOCATION"/>
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\$(var.Manufacturer)\$(var.ProductName)" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</Directory>
</Directory>
</Directory>


<Feature Id="ProductFeature" Title="$(var.ProductName)" Level="1">
<ComponentRef Id="ProductComponent" />
<ComponentRef Id="ApplicationShortcutSniffer" />
</Feature>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" ></Property>
<WixVariable Id="WixUILicenseRtf" Overridable="yes" Value="$(var.licenseRtf)"/>
<UIRef Id="WixUI_InstallDir"/>




</Product>

</Wix>

最佳答案

有一个open bug report在 WiX 问题跟踪器中,指示错误与以空字符结尾的 RTF 文件有关。

我会检查您的 license.rtf 是否以空结尾然后从文件中截断该字符(或创建一个没有空的新 RTF 文件)

关于visual-studio - 为什么wix项目会出错?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33932848/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com