WIX Candle.exe CNDL0047:TypeLib 元素未公布,因此需要父文件元素

WIX Candle.exe CNDL0047 : The TypeLib element is non-advertised and therefore requires a parent File element

我 运行 在尝试 运行 Candle.exe 一些遗留 32 位 DLL(ssubtmr.dll 和 cnewmenu.dll)时遇到 Wix 问题.

heat 命令看起来像这样(我不认为这是问题所在):

heat.exe file C:\Blah\AddIns\Support\ssubtmr.dll -cg ssubtmr.dll -gg -g1 -sfrag -srd -svb6 -var var.AddinsSupport -dr AddinsSupport

这些文件和这些文件单独产生的错误(不是,例如,ssubtmr6.dll)是:

error CNDL0047 : The TypeLib element is non-advertised and therefore requires a parent File element.

我发现了一个 ,它可以手动将 TypeLib 元素嵌套在文件元素中。这允许我使用 candle 将生成的 *.wxs 编译为 *.wixobj,但是当我 运行 light.exe 我得到以下错误:

error LGHT0311 : A string was provided with characters that are not available in the specified database code page '1252'. Either change these characters to ones that exist in the database's code page, or update the database's code page by modifying one of the following attributes: Product/@Codepage, Module/@Codepage, Patch/@Codepage, PatchCreation/@Codepage, or WixLocalization/@Codepage.

这是我的 wxs 文件的样子(在我将较低的 TypeLib 元素移动到 File 元素下方之前):

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Fragment>
        <DirectoryRef Id="AddinsSupport">
            <Component Id="cmp983054CCC56DD72D6D3F9BFD7ED0F8B5" Guid="7F4E338B-5F79-4F8A-B4E4-A36C9607A1CF">
                <File Id="fil5F0EEFBFCC94DFEB51EA7B7D3A19E268" KeyPath="yes" Source="$(var.AddinsSupport)\ssubtmr.dll">
                    <TypeLib Id="{5F7C62D4-9130-11D1-8E21-E08C04C10000}" Description="Subclassing and Timer Assistant (with configurable message response, multi-control support + timer bug fix)" HelpDirectory="AddinsSupport" Language="0" MajorVersion="8" MinorVersion="2">
                        <Class Id="{E779C863-9BEF-11D1-84DD-00C04FA4EE99}" Description="SSubTimer.ISubclass" Version="8.2" Programmable="yes">
                            <ProgId Id="SSubTimer.ISubclass" Description="SSubTimer.ISubclass" />
                        </Class>
                        <Class Id="{E779C867-9BEF-11D1-84DD-00C04FA4EE99}" Context="InprocServer32" Description="SSubTimer.GSubclass" ThreadingModel="apartment" Version="8.2" Programmable="yes">
                            <ProgId Id="SSubTimer.GSubclass" Description="SSubTimer.GSubclass" />
                        </Class>
                        <Class Id="{E779C869-9BEF-11D1-84DD-00C04FA4EE99}" Context="InprocServer32" Description="SSubTimer.CTimer" ThreadingModel="apartment" Version="8.2" Programmable="yes">
                            <ProgId Id="SSubTimer.CTimer" Description="SSubTimer.CTimer" />
                        </Class>
                        <Interface Id="{E52522D8-F165-11D1-8D49-00C04FA4EE99}" Name="GSubclass" ProxyStubClassId="{00020424-0000-0000-C000-000000000046}" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                        <Interface Id="{E779C863-9BEF-11D1-84DD-00C04FA4EE99}" Name="ISubclass" ProxyStubClassId="{00020424-0000-0000-C000-000000000046}" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                        <Interface Id="{E779C868-9BEF-11D1-84DD-00C04FA4EE99}" Name="CTimer" ProxyStubClassId="{00020424-0000-0000-C000-000000000046}" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                        <Interface Id="{E779C86B-9BEF-11D1-84DD-00C04FA4EE99}" Name="CTimer" ProxyStubClassId="{00020420-0000-0000-C000-000000000046}" ProxyStubClassId32="{00020420-0000-0000-C000-000000000046}" />
                    </TypeLib>
                </File>
                <Interface Id="{E779C866-9BEF-11D1-84DD-00C04FA4EE99}" Name="GSubclass" ProxyStubClassId="{00020424-0000-0000-C000-000000000046}" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                <Interface Id="{EFB7317B-F158-11D1-8D49-00C04FA4EE99}" Name="GSubclass" ProxyStubClassId="{00020424-0000-0000-C000-000000000046}" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                <RegistryValue Root="HKCR" Key="CLSID\{E779C863-9BEF-11D1-84DD-00C04FA4EE99}\Implemented Categories\{40FC6ED5-2438-11CF-A3DB-080036F12502}" Value="" Type="string" Action="write" />
                <RegistryValue Root="HKCR" Key="CLSID\{E779C867-9BEF-11D1-84DD-00C04FA4EE99}\Implemented Categories\{40FC6ED5-2438-11CF-A3DB-080036F12502}" Value="" Type="string" Action="write" />
                <RegistryValue Root="HKCR" Key="CLSID\{E779C869-9BEF-11D1-84DD-00C04FA4EE99}\Implemented Categories\{40FC6ED5-2438-11CF-A3DB-080036F12502}" Value="" Type="string" Action="write" />
                <RegistryValue Root="HKCR" Key="Interface\{E779C866-9BEF-11D1-84DD-00C04FA4EE99}\Forward" Value="{E52522D8-F165-11D1-8D49-00C04FA4EE99}" Type="string" Action="write" />
                <RegistryValue Root="HKCR" Key="Interface\{EFB7317B-F158-11D1-8D49-00C04FA4EE99}\Forward" Value="{E52522D8-F165-11D1-8D49-00C04FA4EE99}" Type="string" Action="write" />
                <TypeLib Id="{97177EBC-0C54-11D0-B407-00AA00C14969}" Description="Visual Basic runtime objects and procedures" HelpDirectory="SystemFolder" Hidden="yes" Language="9" MajorVersion="5" MinorVersion="0">
                    <Interface Id="{14E469E0-BF61-11CF-8385-8F69D8F1350B}" Name="AsyncProperty" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                    <Interface Id="{2CE46480-1A08-11CF-AD63-00AA00614F3E}" Name="SelectedControls" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                    <Interface Id="{41A7D760-6018-11CF-9016-00AA0068841E}" Name="DataObject" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                    <Interface Id="{41A7D761-6018-11CF-9016-00AA0068841E}" Name="DataObjectFiles" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                    <Interface Id="{45046D60-08CA-11CF-A90F-00AA0062BB4C}" Name="PropertyBag" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                    <Interface Id="{888A5A60-B283-11CF-8AD5-00A0C90AEA82}" Name="Hyperlink" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                    <Interface Id="{B28FA150-0FF0-11CF-A911-00AA0062BB4C}" Name="AmbientProperties" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                    <Interface Id="{BE8F9800-2AAA-11CF-AD67-00AA00614F3E}" Name="ParentControls" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                    <Interface Id="{C0324960-2AAA-11CF-AD67-00AA00614F3E}" Name="ContainedControls" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                    <Interface Id="{D4E0F020-720A-11CF-8136-00AA00C14959}" Name="DataBindings" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                    <Interface Id="{D624E3E0-720A-11CF-8136-00AA00C14959}" Name="DataBinding" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
                </TypeLib>
            </Component>
        </DirectoryRef>
    </Fragment>
    <Fragment>
        <ComponentGroup Id="AddinsSupport_ssubtmr.dll">
            <ComponentRef Id="cmp983054CCC56DD72D6D3F9BFD7ED0F8B5" />
        </ComponentGroup>
    </Fragment>
</Wix>

可能值得注意的是,两个有问题的 DLL 都包含相同的类型库,“Visual Basic 运行时间对象和过程”。

我已阅读 this,这表明我可以进一步填充 TypeLib,但我不知道如何执行此操作。

谁能提供一些建议?谢谢

答案与我最初的想法完全无关。

Light.exe 失败是因为 .wixobj 文件中有一个 Ü。一旦我将其删除(在此过程的早期将其从 .wxs 文件中删除),一切都很好。