wix 想要一个程序集清单 - 我有一个

wix wants an assembly manifest - I have one

我创建了一个 C# CustomActions 项目,用于在 Wix 中创建安装程序。我所拥有的只是示例项目和引用它的示例 Wix 项目。我在C#项目中创建了一个app.manifest。

Example simple program

我得到的是:

1>------ Build started: Project: SetupProject1, Configuration: Debug x86 ------
1>      C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe -dDebug -d"DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio19\Professional\Common7\IDE\" -dSolutionDir=C:\src\WixTest\ -dSolutionExt=.sln -dSolutionFileName=WixTest.sln -dSolutionName=WixTest -dSolutionPath=C:\src\WixTest\WixTest.sln -dConfiguration=Debug -dOutDir=bin\Debug\ -dPlatform=x86 -dProjectDir=C:\src\SetupProject1\ -dProjectExt=.wixproj -dProjectFileName=SetupProject1.wixproj -dProjectName=SetupProject1 -dProjectPath=C:\src\SetupProject1\SetupProject1.wixproj -dTargetDir=C:\src\SetupProject1\bin\Debug\ -dTargetExt=.msi -dTargetFileName=SetupProject1.msi -dTargetName=SetupProject1 -dTargetPath=C:\src\SetupProject1\bin\Debug\SetupProject1.msi -out obj\Debug\ -arch x86 -ext ..\WixTest\bin\Debug\WixTest.CA.dll Product.wxs
1>candle.exe(0,0): error CNDL0144: The extension '..\WixTest\bin\Debug\WixTest.CA.dll' could not be loaded because of the following reason: Could not load file or assembly 'file:///C:\src\WixTest\bin\Debug\WixTest.CA.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
1>Done building project "SetupProject1.wixproj" -- FAILED.
1>

========== 构建:0 个成功,1 个失败,1 个最新,0 个跳过 ==========

知道我还需要做什么吗?

是的,我看过了 - 请试试这个:

  1. 请删除对 WixTestCA 的引用,将 WixTest 保留在那里。您不需要直接引用 WixTestCA 文件。您需要一个项目参考。
  2. 将您的公司名称或其他名称(任何内容都可以)添加到属性 Manufacturer.
  3. After='InstallInitialize' 添加到自定义元素以指示在 InstallExecuteSequence 内为相关自定义操作进行调度。

以下是注入更改的片段:

Product element:

<Product Id="*" Name="SetupProject1" Language="1033" Version="1.0.0.0" Manufacturer="Add Company Name here" UpgradeCode="ADD-VALID-GUID-HERE">

Custom element(自定义操作):

<Custom Action='LicenseInfoCustomAction' After='InstallInitialize'>NOT Installed</Custom>