Hi, Oleg!
I tried to Inject 2 dialogs.
var project = new Project("CustomDialogTest",
project.RemoveDialogsBetween(NativeDialogs.WelcomeDlg, NativeDialogs.InstallDirDlg);
project.InjectClrDialog("ShowEmptyDialog", NativeDialogs.WelcomeDlg, NativeDialogs.InstallDirDlg);
Second InjectClrDialog function throw exception:
An unhandled exception of type 'System.ApplicationException' occurred in WixSharp.dll
Additional information: Project.CustomUI is already initialized. Ensure InjectClrDialog is invoked before any adjustments made to CustomUI.
I tried to Inject 2 dialogs.
var project = new Project("CustomDialogTest",
new Dir(@"%ProgramFiles%\My Company\My Product",
new File("setup.exe")));
project.InjectClrDialog("ShowCustomDialog", NativeDialogs.InstallDirDlg, NativeDialogs.VerifyReadyDlg);project.RemoveDialogsBetween(NativeDialogs.WelcomeDlg, NativeDialogs.InstallDirDlg);
project.InjectClrDialog("ShowEmptyDialog", NativeDialogs.WelcomeDlg, NativeDialogs.InstallDirDlg);
Second InjectClrDialog function throw exception:
An unhandled exception of type 'System.ApplicationException' occurred in WixSharp.dll
Additional information: Project.CustomUI is already initialized. Ensure InjectClrDialog is invoked before any adjustments made to CustomUI.