cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
HLoEpicor
Level 3

MSBuild change ProductVersion for a Visual Studio sln with multiple ISM files

I have an existing Visual Studio solution (sln) with many projects and few Visual Studio Installer projects, I have replaced the VS Installer projects with the same number of InstallShield projects from within Visual Studio. The components are mostly build outputs (from asp.net projects) and few files (eg. web.config).  We use MSBuild scripts for our projects. Building the solution will build the the InstallShield projects also, for that I can use something like that in my MSBuild scripts:

<MSBuild
Projects="[Path\MySolution.sln]"
Properties="Configuration=Release;Platform=Any CPU"
Targets="Build" />

Within MSBuild scripts if I have to build a standalone ISM that uses previously built files and set the ProductVersion I will use something like this:

<InstallShield.Tasks.InstallShield
Condition="'$(Patch)'!='' And '$(Patch)'!='0'"
Project="$(InstallFolder)\MyProject.ism"
ProductConfiguration="Package"
ReleaseConfiguration="MSI"
PropertyOverrides="@(InstallShieldPropertyOverrides)"
ProductVersion="$(Major).$(Minor).$(Revision).$(Patch)"
/>

What can I do in my VS Solution with InstallShield projects to build the solution and set the ProductVersion of each of the InstallShield Installer projects? In an old forum post Setting ProductVersion on an InstallScript project from MSBuild.   that mentioned something about InstallShield Automation project , is that still the way to go?   I have no issue to write a C# exe for MSBuild to call with command line params (version numbers) to set the versions of those ISM, but much prefer if it can be done within MSBuild scripts. 

Thanks in advance. 

Labels (1)
0 Kudos
0 Replies