[wix-users] Deferred Custom Action Issue in Upgrade
Ven H
venh.123 at gmail.com
Sun Sep 2 08:30:02 PDT 2018
I have a Deferred Custom Action which is scheduled Before InstallFinalize.
In this Custom Action, I have the following 2 lines in the beginning.
string xmlPath =
System.IO.Path.Combine(session.CustomActionData[Constants.INSTALL_LOCN_CA_DATA_VAR],
"MyXml.xml");
XDocument appPoolDoc = XDocument.Load(xmlPath);
Essentially, I am reading the xml file to update some app pool properties.
These 2 lines work fine and also the rest of the code during installation.
But during Upgrade, the XDocument.Load line is throwing a File Not Found
exception in the log, even if the file is present. I am not sure what is
going wrong. The Major Upgrade is scheduled After Install Execute. Can
anyone please help me with this issue?
Also, I have some other observations / questions.
1. I am able to schedule an immediate custom action After Install Finalize,
but I am not able to schedule a deferred custom action After Install
Finalize (but only before). In that case, why should I use a deferred
custom action and where should I use it?
2. In case of a deferred custom action, even when an exception occurs, it
is simply rolling back without showing an error message. Then I have to
search the log for the correct exception, even though I have set the
Return="check" attribute on the deferred custom action.
3. Why is my deferred custom action able to find the file during install,
but not able to find it during upgrade.
Can anyone please help?
More information about the wix-users
mailing list