I use the following in my project, adding it to either the WiX project file
or as a task during 'msbuild':

  <!-- Define variables to be used throughout the install process -->
  <Target Name="SetParameters">
    <GetAssemblyIdentity AssemblyFiles="..\HRActions\bin\HRActions.dll">
      <Output TaskParameter="Assemblies" ItemName="AssemblyVersions" />
    </GetAssemblyIdentity>

    <CreateProperty Value="%(AssemblyVersions.Version)">
      <Output TaskParameter="Value" PropertyName="AssyVersion" />
    </CreateProperty>

    <CreateProperty
Value="$(AssyVersion.Split('.')[0]).$(AssyVersion.Split('.')[1]).$(AssyVersion.Split('.')[2])">
      <Output TaskParameter="Value" PropertyName="ShortAssyVersion" />
    </CreateProperty>

    <CreateProperty
Value="$(DefineConstants);LongAssyVersion=$(AssyVersion)">
      <Output TaskParameter="Value" PropertyName="DefineConstants" />
    </CreateProperty>

    <CreateProperty
Value="$(DefineConstants);ShortAssyVersion=$(ShortAssyVersion)">
      <Output TaskParameter="Value" PropertyName="DefineConstants" />
    </CreateProperty>

    <Message Text="AssemblyVersions: @(AssemblyVersions)"/>
    <Message Text="AssyVersions: $(AssyVersion)"/>
    <Message Text="ShortAssyVersion: $(ShortAssyVersion)"/>

  </Target>


This gets the version applied to the DLL file and then parses out the
pieces I want.



Brian

If you can't explain it simply, you don't understand it well enough.  -
Albert Einstein


On Mon, Jan 13, 2014 at 1:38 AM, Manas <manas.taluk...@gmail.com> wrote:

> Is there some way to get the version of a package contained within a bundle
> using the burn API? None of the event handler arguments seem to expose this
> information.
>
>
>
>
>
> --
> View this message in context:
> http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-get-package-version-using-burn-API-tp7591717.html
> Sent from the wix-users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to