我目前在解决方案中有两个项目,一个用于构建msi的部署项目,另一个包含我的自定义操作的项目。我在引用自己的自定义操作时遇到了麻烦,同时出现了两个错误:
public function template($person, $country, $region) {
....
}
..\WixSharp Setup\bin\Debug\WixSharpSetup.exe" "/MSBUILD:WixSharp Setup" "/WIXBIN:"" exited with code -532462766. WixSharp Setup ..\WixSharp Setup\packages\WixSharp.1.9.2\build\WixSharp.targets 6
部署项目
No CA or UI entry points found in module: ..\WixSharp Setup\WixSharp Setup\WixSharpSetup.exe WixSharp Setup ..\WixSharp Setup\WixSharp Setup\EXEC
CustomAction项目
using System;
using System.Windows.Forms;
using Deploy.CustomAction;
using WixSharp;
using WixSharp.Forms;
namespace WixSharp_Setup
{
class Program
{
static void Main()
{
var project = new ManagedProject("MyProduct",
new Dir(@"%ProgramFiles%\My Company\My Product",
new File("Program.cs")),
new ManagedAction(SearchAPIActions.SearchAPIInstall));
project.GUID = new Guid("6fe30b47-2577-43ad-9095-1861ba25889b");
project.ManagedUI = ManagedUI.Default; //all standard UI dialogs
project.BuildMsi();
}
答案 0 :(得分:1)
万一有兴趣的人,我找到了解决问题的方法,因为“自定义”操作正在编译为.dll,因此您在声明ManagedAction时需要直接引用它。
new ManagedAction(CustomActions.IISReset, @"Your full Path\Customs.dll"));