I was able to figure it out using DefineConstants in a BeforeBuild event to
get the version of the project file and set it as a variable to be used in
Bundle Version:

Bundle.wxs:

    <Bundle Name=&quot;$(var.ProductName) Bootstrapper
v$(var.BuildVersion)&quot;
            Version=&quot;$(var.BuildVersion)&quot;


Bootstrapper.wixproj:

      &lt;Target Name=&quot;BeforeBuild&quot;>
        <GetAssemblyIdentity
AssemblyFiles="..\MyApp\bin\$(Configuration)\MyApp.exe">
          <Output TaskParameter="Assemblies" ItemName="AssemblyVersion" />
        </GetAssemblyIdentity>
        <PropertyGroup>
         
<DefineConstants>BuildVersion=%(AssemblyVersion.Version)</DefineConstants>
        </PropertyGroup>
      </Target>
      
      <Target Name="AfterBuild">
        <GetAssemblyIdentity
AssemblyFiles="..\MyApp\bin\$(Configuration)\MyApp.exe">
          <Output TaskParameter="Assemblies" ItemName="AssemblyVersion" />
        </GetAssemblyIdentity>
        <Copy SourceFiles=".\bin\$(Configuration)\$(OutputName).exe"
DestinationFiles=".\bin\$(Configuration)\MyApp.%(AssemblyVersion.Version).exe"
/>
        <Delete Files=".\bin\$(Configuration)\$(OutputName).exe" />
      </Target>



--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Automatically-increment-and-synchronize-version-of-product-and-bootstrapper-tp7589213p7589219.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to