views:

1083

answers:

4

I have a setup project for my C# program, and this setup project has a Version in its properties. I'd like for the MSI file that is generated to have this Version embedded in it, so I can mouse over it in explorer and see what version the file is.

I'm using VS2008. How can I do this?

A: 

I might be wrong, but doesn't the msi version follow the version in the AssemblyInfo file of your startup project?

RWendi
Nope. Not by default, anyway. I don't see an option to make it that either.
Blorgbeard
+1  A: 

That's a good question but I don't know any setup tool that could do that. Moreover I never encountered an MSI file with file version resource embedded in it, so it's not a common practice. Usually if I want to find out version of an MSI file I have to open it in Orca and check ProductVersion property there (in Property table).

Pavel Chuchuva
+1  A: 

As far as I know MSI file will never show version. Simple reason is that MSI files are not PE files, they are sort-of database. Msiexec.exe then interprets this database to do the actual installation. The version property you mention is used by MSI engine internally for upgrades, uninstalls etc and is never displayed.

Vivek
Looks like you're correct. Accepted until such time as someone proves you wrong :P
Blorgbeard
Yes, please keep us informed about your findings, if any. I ran into same issue last year :)
Vivek
+4  A: 

If you simply add the "Version: 1.5.0" text into the Description property of the Setup Project, the version number also shows on the MSI file like so:

http://screencast.com/t/A499i6jS

Ron

Ron Savage
Excellent! That's good enough for me - thanks!
Blorgbeard