Hello I have custom bootstrapper application. All work fine, but when work is done and i close app process continuing to hang. I've noticed that when i tryed to recompile installer. I have code like this:
protected override void Run()
{
//MessageBox.Show("Run");
// set the global message dispatcher
Dispatcher = Dispatcher.CurrentDispatcher;
// Create the model, view model and the view of the main window.
// The view model handles the enitre ui.
Model model = new Model(this);
MainWindowViewModel viewModel = new MainWindowViewModel(model);
MainWindow mainWindow = new MainWindow(viewModel);
Engine.Detect();
// Create a Window to show UI.
Engine.Log(Microsoft.Tools.WindowsInstallerXml.Bootstrapper.LogLevel.Verbose, "Creating UI");
Engine.CloseSplashScreen();
mainWindow.Show();
// run the threading dispatcher
Dispatcher.Run();
// Finalize the installation (with the finalResult) and quit the process.
Engine.Quit(model.FinalResult);
}
I've debugged it and certainly it calls the function Engine.Quit(0) every time. Sometimes it work fine but sometimes the process dosen't stop. There is no "Shutting down, exit code: " line in log. And i don't know why. Does anybody have an idea what i do wrong
I've noticed that it happens only when i modify two or more packages.