-
Notifications
You must be signed in to change notification settings - Fork 179
Tips'n'Tricks
public class ManagedBa : BootstrapperApplication
{
[System.Runtime.InteropServices.DllImport("user32.dll")]
private static extern bool SetProcessDPIAware();
protected override void OnStartup(StartupEventArgs args)
{
SetProcessDPIAware(); // https://stackoverflow.com/a/44839778
Debug.Assert(false);
base.OnStartup(args);
}
Dedicated wiki page: https://github.com/oleg-shilo/wixsharp/issues/1173
Thanks to the fact that ManagedAction is implemented in a plain .NET assembly it can be debugged as easily as any other managed code. The most practical way of debugging is to put an assert statement and attach the debugger when prompted:
[CustomAction] public static ActionResult MyAction(Session session) { Debug.Assert(false); ...
Note, when attaching the debugger you need to ensure that you have your Visual Studio is running elevated. Otherwise your VS debugger you may not be able to attach. When attaching, you will need to attach to the msiexec.exe process. Normally you will have two process: one is the system Windows Installer service and another one is the active MSI session.
- Home - Overview
- Architecture
- Documentation
- Samples Library
- Product Roadmap
- Tips'n'Tricks