The creation of msi is not an async process. It doesn't return until the build succeeds or fails. An empty return value indicates that your build fails. Your comment "setup.msi doesn't exist" confirms that. Meaning that on a first attempt some input files are not ready/found and this is the problem that you need top fix.
Have a look at the BuildMsi output of analyse
BTW you may want to have a look at Signing sample, which demonstrates how to sign MSI with Wix#:
Have a look at the BuildMsi output of analyse
Compiler.ToolsOutputReceived
event data to see what exactly upsets WiX compilers.BTW you may want to have a look at Signing sample, which demonstrates how to sign MSI with Wix#:
string msi = Compiler.BuildMsi(project); int exitCode = Tasks.DigitalySign(msi, "wixsharp.pfx", "http://timestamp.verisign.com/scripts/timstamp.dll", "my_password"); if (exitCode != 0) Console.WriteLine("Could not sign the MSI file."); else Console.WriteLine("the MSI file was signed successfully.");