cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kaneohe
Level 6

1 File Missing After Major Upgrade

Project Type: Basic MSI

Our installer deploys a DLL file on initial install and everything looks good and works fine. During a major upgrade, the previous installation gets uninstalled (per the major upgrade settings) and the new one gets installed. The new installation looks complete except there is one missing DLL. Here's what I've looked at thus far (to no avail):

[LIST=1]
  • The DLL is included and the version has not changed between packages
  • Looked at the MSI log file (I see nothing obvious, some log entries shown below)
  • Compared the MSI log data with a similar DLL that is not problematic, nothing notably different
  • Checked PendingFileRenameOperations and rebooted the machine
  • Component "Destination" has not changed
  • Component Code has not changed
  • RemoveFile table has no entry for this DLL
  • There are no Script CustomActions that manage files
  • There are three references to this DLL in the registry and they are all managed by the MSI engine during assembly publishing

    There are about 20 references to this DLL in the log. Here are the last references to it (very near the bottom of the log file):

    [CODE]MSI (s) (78:14) [14:41:02:591]: Executing op: AssemblyPublish(Feature=FeatureA,Component={1E1C2982-B23F-459A-8E53-E9DF27900B80},AssemblyType=3,AppCtx=C:\Program Files (x86)\Product\Bin\FileName.dll,AssemblyName=FileName,Version="1.0.2634.25925",PublicKeyToken="B7CA6C66E8031842",Culture="neutral",FileVersion="1.0.2634.25925",ProcessorArchitecture="MSIL",)
    MsiPublishAssemblies: Application Context:C:|Program Files (x86)|Product|Bin|FileName.dll, Assembly Name:FileName,Version="1.0.2634.25925",PublicKeyToken="B7CA6C66E8031842",Culture="neutral",FileVersion="1.0.2634.25925",ProcessorArchitecture="MSIL"
    MSI (s) (78:14) [14:41:02:591]: Note: 1: 1402 2: UNKNOWN\Installer\Assemblies\C:|Program Files (x86)|Product|Bin|FileName.dll 3: 2 [/CODE]

    What else might account for the DLL not being installed during the upgrade?
  • Labels (1)
    0 Kudos
    5 Replies
    TsungH
    Level 12

    You may find this MS KB article useful.
    0 Kudos
    kaneohe
    Level 6

    This DLL file is not being installed into the GAC. It is being installed into the same folder as all the rest of the DLLs for our software. As such, I would think if it were an issue with the RemoveExistingProducts sequencing then many DLLs would be wrong, not just a single DLL file (1 of about 150 DLLs). According to the Microsoft KB:

    Note When an assembly is not located in the global assembly cache, no renaming occurs. The standard Windows Installer file versioning rules apply, and the component in the major upgrade is allowed for installation.
    0 Kudos
    TsungH
    Level 12

    After coming across this blog, I am not sure if this behavior can be generalized to assembly installed to non GAC and WinSxS folders.

    I would recommend inserting "breakpoints" in the installation to determine if the installed DLL (by the old package) gets removed by RemoveExistingProducts action during major upgrade, and if the DLL (in the new package) gets copied and deleted, or does not get copied at all, and if value of ref count on the DLL is expected at various breakpoints.
    0 Kudos
    ITI_Randy
    Level 6

    TsungH wrote:
    After coming across this blog, I am not sure if this behavior can be generalized to assembly installed to non GAC and WinSxS folders.

    I would recommend inserting "breakpoints" in the installation to determine if the installed DLL (by the old package) gets removed by RemoveExistingProducts action during major upgrade, and if the DLL (in the new package) gets copied and deleted, or does not get copied at all, and if value of ref count on the DLL is expected at various breakpoints.


    In dealing with this problem in the past, we have often noticed that simply switching the upgrade settings to "Install Setup and then remove unneeded files" has stopped the problem. If it does, it is definitely an issue with the RemoveExistingProducts sequencing. If it is already set to this setting and still loses the file on upgrade, verify that the component code has not changed as this will cause the file to be removed.
    0 Kudos
    kaneohe
    Level 6

    I officially don't understand this issue. Changing the upgrade setting to "install then remove" does in fact eliminate this problem. However, using the default sequencing for "uninstall then install new" just doesn't work right. Nothing has changed with this installer pertaining to this file in the past several releases but it suddenly stops installing the upgrade correctly? I guess using "install then remove" is what we'll have to do to make it work right.
    0 Kudos