wix wants an assembly manifest - I have one

[亡魂溺海] 提交于 2020-03-03 14:00:32

问题


I have created a C# CustomActions project to use in wix to create an installer. All I have is the sample project and a sample wix project that references it. And I created an app.manifest in the C# project.

Example simple program

What I get is:

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 Studio\2019\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>

========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

Any idea what else I need to do?


回答1:


Yes, I had a look - please try this:

  1. Please remove the reference to WixTestCA, leave WixTest in there. You don't need a direct reference to the WixTestCA file. You need a project reference instead.
  2. Add your company name or something (anything will do) to the attribute Manufacturer.
  3. Add After='InstallInitialize' to the Custom element to indicate scheduling inside the InstallExecuteSequence for the custom action in question.

Here are the snippets with injected changes:

The Product element:

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

The Custom element (custom action):

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


来源:https://stackoverflow.com/questions/60398031/wix-wants-an-assembly-manifest-i-have-one

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!