将 Wix 项目迁移到 4.0 版

Migrate Wix Project to version 4.0

我最近将 Wix 升级到版本 4.0。

更新命名空间后 Visual Studio (2015) 将无法识别这些新命名空间。

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
    <Product Id="*" Name="_any_name" Language="1033" Version="1.0.0.0" Manufacturer="Anyone" UpgradeCode="8c568038-54cf-43ff-aa2c-581f4dd0aea0" Codepage="1252">
        <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate EmbedCab="yes" />
    <Feature Id="ProductFeature" Title="_any_title" Level="1">
        <ComponentGroupRef Id="group_ProductComponents" />
    </Feature>
    <Property Id="pro_SetupExe" Value="INSTALLFOLDER" />
    <CustomAction Id="ca_LaunchSetupExe" Property="pro_SetupExe" ExeCommand="/FORCE_HIDE_FIRST_RUN /UNATTENDED_INSTALL /AUTOACCEPT_ALL /FORCE_CLOSE_WHEN_DONE /ON_REBOOT_MESSAGE:”NO”" Execute="commit" />
    <CustomAction Id="ca_SetSetupPath" Property="pro_SetupExe" Value="[INSTALLFOLDER]x64ATIDriver\setup.exe" />
    <InstallExecuteSequence>
        <Custom Action="ca_SetSetupPath" Before="ca_LaunchSetupExe" />
        <Custom Action="ca_LaunchSetupExe" Before="InstallFinalize" />
    </InstallExecuteSequence>
    </Product>
    <Fragment>
        <Directory Id="TARGETDIR" Name="SourceDir">
            <Directory Id="TempFolder">
                <Directory Id="INSTALLFOLDER" />
            </Directory>
        </Directory>
    </Fragment>
</Wix>

The Wix element has an incorrect namespace of 'http://wixtoolset.org/schemas/v4/wxs'. Please make the Wix element look like the following: Wix xmlns = "http://schemas.microsoft.com/wix/2006/wi"

我发现了这些:Migrate Wix Project to v4.0 instructions

但我不明白这是什么意思:

Fix: Explicitly set absent Id attributes on File element to the Name attribute or filename from the Source attribute.

所以目前我只有那种"crashed"项目,无法构建。

非常感谢您的帮助。

问候 Muffex

命名空间错误让人感觉该项目仍在由 WiX v3 构建。此外,迁移到您找到的 v4 页面是针对 WixCop 工具的,该工具可以自动执行您在那里找到的所有内容。在WiX安装目录的bin目录下