Quantcast
Channel: wixsharp Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1354

New Post: How to catch the OnBuildCompleted event to sign my setup file?

$
0
0
I need to sign (by certificate) my setup.msi file after it has been built.
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.
        }
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?

Viewing all articles
Browse latest Browse all 1354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>