cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
beginner_me
Level 3

Minor Upgrade does not update file if ProductVersion of the file is string

Hi install developers,

I have this problem regarding minor upgrade that does not update the affected assembly/file.

I authored an Basic MSI install project for the SampleApp.exe application, build it and installed on a target machine.
Now that I've made some updates on the SampleApp.exe, I build another installer using the same Basic MSI project updated the ProductVersion accordingly.

Problem is, when I installed the new version of the installer using REINSTALLMODE=vomus REINSTALL=ALL the file SampleApp.exe didn't get updated. But if I changed the AssemblyInformationalVersion/ProductVersion of the SampleApp.exe .rc file to be equal to the two versions, it works okay.

Is this the way it works?
Is there other way in InstallShield/MSI to forcefully get the AssemblyVersion rather than the ProductVersion/AssemblyInformationVersion?

NOTE: I build the SampleApp.exe with the following properties on AssemblyInfo.cs
//Used for strong naming
[assembly: AssemblyVersion("1.0.9.4222")]

//used for information, should match the version of the package with a build number if it is patched beyond a package release
[assembly: AssemblyFileVersion("1.0.9.4222")]

//used for information, should match the version of the package with a build number if it is patched beyond a package release
[assembly: AssemblyInformationalVersion("SampleApp_Build4222")]

Previous Build had a version number "1.0.8.3423"

More info on the above properties
http://oncoding.blogspot.no/2012/04/net-assembly-version-numbers.html
Labels (1)
0 Kudos
(3) Replies
beginner_me
Level 3

Hi,

Could someone confirm if indeed Windows Installer uses the Product Version "AssemblyInformationalVersion" of the file instead of the AssemblyVersion/AssemblyFileVersion?

If that would be the case, my only choice is to delete AssemblyInformationVersion or set the value equal to the AssembleyFileVersion. So that, windows installer updates the older version of the file previously installed upon minor upgrade.

Thanks,
Tope
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

This may depend on whether your files are installed to the Global Assembly Cache, or to a regular file location. In a regular file location, AssemblyFileVersion should be the correct item - whatever changes the version that shows up in Explorer properties. In the GAC, I'm having trouble remembering whether AssemblyVersion is used instead, as the GAC works at the Assembly level, but Windows Installer may still examine file version.
0 Kudos
beginner_me
Level 3

Hi Michael,

The assembly was installed on a regular file location only. Yes, AssemblyFileVersion is the correct item however, if AssemblyInformationalVerion is added it changes the Product Version field in the explorer properties. I think this causes the issue.

One thing that I'm not sure of would be, Windows Installer uses the Product Version or File Version based on the explorer property of the file. For now, I will just remove the AssemblyInformationalVersion.

-Tope
0 Kudos