digitalrinaldo
Posts: 88
Joined: Sun Jan 13, 2013 2:51 am

The Advanced Installer Version Number versus the C# Assembly

I would like to keep the AdvancedInstaller assembly number and the C# version number in sync. I have a number of questions in this area.
  • Can I get the advanced installer assembly number in my application. I use AI to install a C# application. When the application installs it runs the C# program. IN that C# program I would like to read the version number of the AI. I looked and saw discussion from many years ago about this being a nice features. Seems like something many would have needed. Is it available?
    When I use AI with VS2013 I would like the AI version number and the assembly version number to be one and the same. How do I do that?
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: The Advanced Installer Version Number versus the C# Asse

Hello,

To retrieve the Product Version from a file, right-click in the related edit box from the Product Details page and select the “Set version from file...” menu item. This will allow you to select a file from Files and Folders page. You can change the source file by clicking the [ ... ] button in the edit box.

You can revert to a simple string value by right-clicking in the edit box and selecting the “Set version to string value” menu item.

Note that Windows Installer uses only the first three fields of the product version. If you include a fourth field in your product version, the installer ignores the fourth field. You can take a look on the ProductVersion property article.

Please let us know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
digitalrinaldo
Posts: 88
Joined: Sun Jan 13, 2013 2:51 am

Re: The Advanced Installer Version Number versus the C# Asse

Dan -- thanks that helps alot. I may not have been clear on the second question. I have a bad habit of having more than one question in a post. I have a VS2013 solution and it has three projects the application, tests and the advanced installer project. When I build and change the version in advanced installer is there a way to grab that version number and use it in the assembly for the application so that the application assembly version number and the advanced installer assembly number are one and the same.
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: The Advanced Installer Version Number versus the C# Asse

Hello,

I'm afraid we don't have support for this.
However, you can create a script file to sync your Advanced Installer project version and the assembly version. I assume you are changing the Advanced Installer version through the UI.
In order to set the version for you Advanced Installer project through the command line you can use the SetVersion statement.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Medvezhonok
Posts: 6
Joined: Thu May 29, 2014 11:53 pm

Re: The Advanced Installer Version Number versus the C# Asse

Send me an email and I'll send you a python script that will do what you want (and a bit more).

mike at millermicrosystems dot com

Return to “Common Problems”