Hello,
I'm having trouble creating an installer with a custom action.
I have followed this sample: https://www.advancedinstaller.com/user- ... et-ca.html
I get this error;
I have this setup;
These are the temp files I'm adding
My custom action is ;
public static int CustomAction1(string aMsiHandle)
{
MsiSession session = new MsiSession(aMsiHandle);
try {
session.Log("Trying to save license", MsiSession.InstallMessage.ERROR);
var license = new License
{
StartDate = DateTime.Now,
EndDate = DateTime.Now.AddDays(30),
Type = 0,
HardwareID = session.GetProperty("ProductCode"),
};
license.Signature = "test signature";//_dataProtectionService.CreateSignature(license);
SaveLicense(license, session);
}
catch(Exception e) {
session.Log($"Exception of save license is {e.Message}", MsiSession.InstallMessage.ERROR);
session.Log($"Exception of save license is {e.InnerException?.Message}", MsiSession.InstallMessage.ERROR);
}
return 0;
}
Has anyone ever had similar issues? I also had a lot of trouble adjusting the references, do I need to put everything in the temp folder and just expect it to work?
Also the debugging isn't working anyhow although I have also attached the .pdb file? Is it not possible to debug when working with temp files?
Thank you!