wixtoolset / issues

WiX Toolset Issues Tracker
http://wixtoolset.org/
129 stars 36 forks source link

FileSearch does not work in a Merge Module #8558

Open MatthiasRInst opened 3 months ago

MatthiasRInst commented 3 months ago

WiX Version

4.0.5

.NET or MSBuild or Visual Studio Version

Visual Studio 17.9.7

HeatWave Version

1.0.4.5

Windows Version

Win10 22H2

Repro Repo

No response

Repro Steps

Build a Merge Module with the following WiX source code:

<Module Id="FileSearch" Language="1033" Version="1.0.0.0"
          Guid="{110CF125-7A17-41F1-9C16-DDDAE0A1B03A}" InstallerVersion="500">
        <SummaryInformation Manufacturer="Licence Owner" />
    <Property Id="FILEFOUND" Secure="yes">
      <DirectorySearch Id="Windows" Path="[WindowsFolder]" >
        <FileSearch Id="MyFile_ini" Name="MyFile.ini" />
      </DirectorySearch>
    </Property>
</Module>

Actual Result

Error message:

WIX0001 System.InvalidOperationException: The value '' is not a legal identifier and therefore cannot be modularized. C:\MySourceCodePath\Installation\MergeModules\FileSearch\wix.exe 1

Expected Result

I expect the code to compile, resulting in a Merge Module with entries in the AppSearch, Signature, and DrLocator tables.

In WiX 3, this code compiled.

Acknowledgements

amyspark commented 2 weeks ago

I found the same wrt a Visual Studio property reference, WiX 5.0.1:

<?xml version="1.0" ?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:vs="http://wixtoolset.org/schemas/v4/wxs/vs">
    <Module Id="_gstreamer_1.0_vs_templates_2017_devel" Version="1.25.0" Guid="c6c2a26b-666e-11ef-b657-e8ea6a8c2e90" Language="1033">
        <SummaryInformation Description="GStreamer 1.0 Visual Studio 2017 templates (Development Files)" Manufacturer="GStreamer Project"/>
        <CustomActionRef Id="VS2017InstallVSTemplates"/>
        <PropertyRef Id="VS2017_PROJECTTEMPLATES_DIR"/>
        <Directory Id="VS2017_PROJECTTEMPLATES_DIR">
            <Directory Id="VSPROJECTTEMPLATESDIR" Name="GStreamer">
                <Component Id="_gst_sdk_template.ico" Guid="c6c2a26c-666e-11ef-b05b-e8ea6a8c2e90">
                    <File Id="_gst_sdk_templateico" Name="gst-sdk-template.ico" Source="E:/cerbero-sources/dist/msvc_x86_64/share/vs/2010/wizard/gst-sdk-template.ico"/>
                </Component>
                <Component Id="_gst_sdk_template.vsdir" Guid="c6c2a26d-666e-11ef-8845-e8ea6a8c2e90">
                    <File Id="_gst_sdk_templatevsdir" Name="gst-sdk-template.vsdir" Source="E:/cerbero-sources/dist/msvc_x86_64/share/vs/2010/wizard/gst-sdk-template.vsdir"/>
                </Component>
                <Component Id="_gst_sdk_template.vsz" Guid="c6c2a26e-666e-11ef-bef6-e8ea6a8c2e90">
                    <File Id="_gst_sdk_templatevsz" Name="gst-sdk-template.vsz" Source="E:/cerbero-sources/dist/msvc_x86_64/share/vs/2010/wizard/gst-sdk-template.vsz"/>
                </Component>
            </Directory>
        </Directory>
    </Module>
</Wix>
Error ``` FAILED: gstreamer-1.0-vs-templates-2017-devel.msm C:/Program Files/WiX Toolset v5.0/bin/wix.exe build -out gstreamer-1.0-vs-templates-2017-devel.msm -ext WixToolset.VisualStudio.wixext E:/cerbero/msi-gstreamer-1.0-msvc-x86_64-1.25.0.1-p_7pzkt9/gstreamer-1.0-vs-templates-2017-devel.wxs wix.exe : error WIX0001: System.InvalidOperationException: The value '' is not a legal identifier and therefore cannot be modularized. en WixToolset.Core.WindowsInstaller.Bind.ModularizeCommand.ModularizedRowFieldValue(Row row, Field field) en D:\a\wix\wix\src\wix\WixToolset.Core.WindowsInstaller\Bind\ModularizeCommand.cs:línea 130 en WixToolset.Core.WindowsInstaller.Bind.ModularizeCommand.ModularizeTable(Table table) en D:\a\wix\wix\src\wix\WixToolset.Core.WindowsInstaller\Bind\ModularizeCommand.cs:línea 68 en WixToolset.Core.WindowsInstaller.Bind.ModularizeCommand.Execute() en D:\a\wix\wix\src\wix\WixToolset.Core.WindowsInstaller\Bind\ModularizeCommand.cs:línea 39 en WixToolset.Core.WindowsInstaller.Bind.BindDatabaseCommand.Execute() en D:\a\wix\wix\src\wix\WixToolset.Core.WindowsInstaller\Bind\BindDatabaseCommand.cs:línea 402 en WixToolset.Core.WindowsInstaller.MsmBackend.Bind(IBindContext context) en D:\a\wix\wix\src\wix\WixToolset.Core.WindowsInstaller\MsmBackend.cs:línea 39 en WixToolset.Core.Binder.BackendBind(IBindContext context) en D:\a\wix\wix\src\wix\WixToolset.Core\Binder.cs:línea 65 en WixToolset.Core.Binder.Bind(IBindContext context) en D:\a\wix\wix\src\wix\WixToolset.Core\Binder.cs:línea 40 en WixToolset.Core.CommandLine.BuildCommand.BindPhase(Intermediate output, IReadOnlyCollection`1 localizations, IReadOnlyCollection`1 filterCultures, String cabCachePath, Int32 cabbingThreadCount, IReadOnlyCollection`1 bindPaths, Dictionary`2 bindVariables, InputsAndOutputs inputsOutputs, CancellationToken cancellationToken) en D:\a\wix\wix\src\wix\WixToolset.Core\CommandLine\BuildCommand.cs:línea 338 en WixToolset.Core.CommandLine.BuildCommand.ExecuteAsync(CancellationToken cancellationToken) en D:\a\wix\wix\src\wix\WixToolset.Core\CommandLine\BuildCommand.cs:línea 150 en WixToolset.Tools.Program.Run(IServiceProvider serviceProvider, IMessageListener listener, String[] args, CancellationToken cancellationToken) en D:\a\wix\wix\src\wix\wix\Program.cs:línea 103 en WixToolset.Tools.Program.
d__0.MoveNext() ```