pass version number as parameter when building

33 views
Skip to first unread message

Pablo Carbonell

unread,
Apr 22, 2018, 11:45:48 AM4/22/18
to dotnetinstaller
Hello! I'm looking to fill the productversion and fileversion automatically by passing them as parameters to the linker.

Here's what I tried so far.

I found on the documentation for variables that it says the following:

You can substititute environment variables with the %VARIABLE% syntax, eg. %TEMP%. It is not recommended to rely on environment variables for system locations, use path variables instead.


So I am storing an environment variable in the command line, for example:

set VersionNumber=1.0.8.1


Then I tried to write %VersionNumber% in productversion and this makes the linker fail with an error of invalid xml. I tried also to go to the list of properties and add the ProductVersion property with the value %VersionNumber%, and this generates the string '%VersionNumber%' without making any substitution. Lowercase/uppercase does not seem to make a difference.


Daniel D.

unread,
Apr 22, 2018, 3:21:09 PM4/22/18
to dotneti...@googlegroups.com
It has been a while since I did this. I don't believe substitution happens in InstallerLinker's configuration supplied and the documentation is referring to when the installer actually runs. I could be wrong too ...

I think most people preprocess the configuration file template into one that has all the right properties. For example https://thecodeking.co.uk/article/creating-a-localized-windows-installer-bootstrapper-part-4/ uses a nant task to do it.

--
You received this message because you are subscribed to the Google Groups "dotnetinstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotnetinstaller+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

dB. | Moscow - Geneva - Seattle - New York
code.dblock.org - t:@dblockdotorg - ig:@artdblockdotorgartsy.net - github/dblock
PS: I'm running the NYC TCS Marathon in 2018 for TeamForKids charity. Please donate here.

Pablo Carbonell

unread,
Apr 22, 2018, 3:29:08 PM4/22/18
to dotneti...@googlegroups.com
Thanks for the link!

Virus-free. www.avast.com
Reply all
Reply to author
Forward
0 new messages