0

I have a Winform Application (c# & .Net 4.0). For deployment I use Wix installer. After installation the program shows Version 0.0.0.0. Where am I doing a mistake?

In my project I changed AssemblyInfo like this (so it should automatiacly generate version when I build):

[assembly: AssemblyVersion("1.1.*")]
[assembly: AssemblyFileVersion("1.1.*")]

In WIX I bind version like this:

<?define ProductVersion="!(bind.FileVersion.IUTexe)"?>
<?define UpgradeCode="GUID"?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product 
Id="*" 
Name="Installer Update Test" 
Language="1033" 
Version="$(var.ProductVersion)" 
Manufacturer="Manufacturer" 
UpgradeCode="$(var.UpgradeCode)">
...

As said, after installation, Windows shows Verion as 0.0.0.0.

Version

Anyone had simmilar problem?

Thank you for any help.

EDIT: When I try this in code:

var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
label2.Text = String.Format("My Application Version {0}", version);

It shows the correct version:

Version

EDIT 2: This is how it shows in properties:

user1080533
  • 865
  • 2
  • 21
  • 35
  • I've seen this with a pre-VS2012 Setup project. There's a installer-specific version number that is separate from the version number of the installed assembly. In a VS2010 Setup project there was a place to enter this version number, and if I remember right, I had to manually make it match the app's version number. – adv12 Feb 08 '16 at 15:26
  • @adv12 Do you maybe remember, how you did it? – user1080533 Feb 08 '16 at 15:40
  • In a VS2010 Setup project, I think this property was called "Version" in the PropertyGrid that showed when you selected the Setup project in Solution Explorer. I don't know how to specify it in WiX. Does this question work for you? http://stackoverflow.com/questions/626033/how-can-i-set-the-wix-installer-version-to-the-curent-build-version – adv12 Feb 08 '16 at 15:45
  • I followed that answer in the first place...but, still can't get the Version to show as it should. As I added in Edit above, when I call System.Reflection.Assembly.GetExecutingAssembly().GetName().Version I get the correct value... – user1080533 Feb 08 '16 at 15:54

0 Answers0