We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Fulgan
Posts: 101
Joined: Mon Feb 27, 2012 10:42 am

Product version read from text file

Hello,

As part of my build process, the full application version (major, minor, revision, build number) is written into a text file (actually, it's an include file used while compiling the source code).

I can extract that value and save it in any way that is convenient but I would like for that value to be used by my installer as well.

Is there a way to do this ? tell the installer to fetch the version number from a file, and environment variable, a registry entry or any other persistence mechanism ?

Thanks
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Product version read from text file

Hello,

Please take a look on our The Advanced Installer Version Number versus the C# Assembly forum thread which debates this subject.

Please let us know if that helped, otherwise give us more details about your specific scenario (maybe exemplify).

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Fulgan
Posts: 101
Joined: Mon Feb 27, 2012 10:42 am

Re: Product version read from text file

Thank you for your answer.

I'm afraid I cannot use the "take version from a file" since the version resources inside each individual file do not match the actual product version number.

For the automated build process, I can probably use the /setversion command-line to specify the real product version and update the installer package. However, I don't think this will work from within the IDE itself: am I correct that I cannot use this command-line in the "pre-build" actions ?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Product version read from text file

Hi Fulgan,
am I correct that I cannot use this command-line in the "pre-build" actions ?
Yes, you are correct. The only way update the version automatically in the UI is to have a resource (DLL or EXE) with the version number which you have saved in your text file. You could for example create a dummy file in your build system for which you set this version.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”