You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running this code ends up with an error message in v3.7 and v3.8.
using (InstallPackage pkg = new InstallPackage(filePath, DatabaseOpenMode.Transact))
{
pkg.Consolidate(cabName);
pkg.Commit();
}
Error: Function failed during execution.
at Microsoft.Deployment.WindowsInstaller.SummaryInfo.Persist()
at Microsoft.Deployment.WindowsInstaller.Database.Commit()
After Consolidate, any call to change the SummaryInfo also ends up with an error code:
Error: Function failed during execution.
at Microsoft.Deployment.WindowsInstaller.SummaryInfo.set_Item(UInt32 property, Type type, Object value)
at Microsoft.Deployment.WindowsInstaller.SummaryInfo.set_Item(UInt32 property, String value)
at Microsoft.Deployment.WindowsInstaller.SummaryInfo.set_LastSavedBy(String value)
It seems that there is a problem with Consolidate, because I can change the SummaryInfo and then Commit with no error.
Also, with DatabaseOpenMode.Direct, at the end of using() I get a "function failed during execution" exception with the following StackTrace: at Microsoft.Deployment.WindowsInstaller.SummaryInfo.Persist()
at Microsoft.Deployment.WindowsInstaller.Database.Commit()
at Microsoft.Deployment.WindowsInstaller.Database.Dispose(Boolean disposing)
at Microsoft.Deployment.WindowsInstaller.InstallerHandle.Dispose()
Originally opened by gigipedala
The text was updated successfully, but these errors were encountered:
I figured out that I need to call SummaryInfo.Close(), then no errors would appear. I think it should be mentioned in the docs somewhere, or an example, that the SummaryInfo should be closed before calling InstallPackage.Commit. Only one problem remained, the stream isn't flushed and the msi file size remains the same even if the consolidate used an external cab.
Some new info: when consolidate uses an internal cab, the cab is made first in the temporary folder, and a second call to consolidate crashes because the cab is still in use. A workaround would be to call the carbage collector between 2 consolidate calls.
Running this code ends up with an error message in v3.7 and v3.8.
Error: Function failed during execution.
at Microsoft.Deployment.WindowsInstaller.SummaryInfo.Persist()
at Microsoft.Deployment.WindowsInstaller.Database.Commit()
After Consolidate, any call to change the SummaryInfo also ends up with an error code:
Error: Function failed during execution.
at Microsoft.Deployment.WindowsInstaller.SummaryInfo.set_Item(UInt32 property, Type type, Object value)
at Microsoft.Deployment.WindowsInstaller.SummaryInfo.set_Item(UInt32 property, String value)
at Microsoft.Deployment.WindowsInstaller.SummaryInfo.set_LastSavedBy(String value)
It seems that there is a problem with Consolidate, because I can change the SummaryInfo and then Commit with no error.
Also, with DatabaseOpenMode.Direct, at the end of using() I get a "function failed during execution" exception with the following StackTrace:
at Microsoft.Deployment.WindowsInstaller.SummaryInfo.Persist()
at Microsoft.Deployment.WindowsInstaller.Database.Commit()
at Microsoft.Deployment.WindowsInstaller.Database.Dispose(Boolean disposing)
at Microsoft.Deployment.WindowsInstaller.InstallerHandle.Dispose()
The text was updated successfully, but these errors were encountered: