我希望使用 Wix4 在 .net7 中编写我的第一个 C# CustomAction 项目。
我的项目中有一个非常简单的类,其中一个函数用 CustomAction 属性装饰。
我进行的阅读以及 Wix4 存储库的克隆表明我只需将以下 NuGet 引用添加到我的 cs 项目文件中。
当我编译时,出现两个错误:
Invalid argument: WixToolset.Dtf.WindowsInstaller.dll must be included in the list of support files.
If using the MSBuild targets, make sure the assembly reference has the Private (Copy Local) flag set.
Run Code Online (Sandbox Code Playgroud)
The command ""******\..\tools\WixToolset.Dtf.MakeSfxCA.exe" "*****" "****\.nuget\packages\wixtoolset.dtf.customaction\4.0.1\build\..\tools\x86\SfxCA.dll" "****\obj\Debug\net7\****.dll" "****\obj\Debug\net7\****.CA.rsp"" exited with code 1
Run Code Online (Sandbox Code Playgroud)
(在 WixToolset.Dtf.CustomAction.targets 代码 MSB3073 中报告为错误)
根据 Wix4source 中的示例 CA 项目,我只有一个对 WixToolset.Dtf.CustomAction 的 NuGet 包引用 - 尽管我也无法在 VS2022 中构建 Wix4 自定义操作项目。
<Project …Run Code Online (Sandbox Code Playgroud)