I need to sign (by certificate) my setup.msi file after it has been built.
In Setup.cs I have next code:
The problem appears only on "Clean" build (after Clean, and Rebuild commands)
I thought that method BuildMsi will return path (looking into the source code), but it returns null.
if I delete sign file logic or to second build after the first one - all is OK. Looks like the creation of msi is async process.
So, is there any buildComplete event to be sure, that BuildMsi has finished own work and all files have been created?
Or what is you suggestion for this?
In Setup.cs I have next code:
staticvoid Main() { ManagedProject project = CreateSetupProject(); ValidateAssemblyCompatibility(); project.BuildMsi(); SignSetupFile(project); // after "Clean, Rebuild" no all files are made by BuildMSI, so the setup.msi doesn't exist at the moment when I want to sign it with signtool.exe. Only setup.wix file exists in output folder. }
I thought that method BuildMsi will return path (looking into the source code), but it returns null.
if I delete sign file logic or to second build after the first one - all is OK. Looks like the creation of msi is async process.
So, is there any buildComplete event to be sure, that BuildMsi has finished own work and all files have been created?
Or what is you suggestion for this?