Yes.
If the AssemblyVersion is what you're after, Microsoft MSBuild supports you
directly:
<!-- Get the version info from the assembly to use as the version number of the
assembly -->
<Target Name="ExtractVersionInfo">
<GetAssemblyIdentity
AssemblyFiles="$(IntermediateOutputPath)\$(AssemblyName).dll">
<Output TaskParameter="Assemblies" ItemName="MyAssembly" />
</GetAssemblyIdentity>
</Target>
In this example, %(MyAssembly.Version) will evaluate to the AssemblyVersion of
the assembly at "$(IntermediateOutputPath)\$(AssemblyName).dll".
If you want the AssemblyFileVersion, you'll need the
MSBuild.Community.Extensions:
<MSBuild.ExtensionPack.Framework.Assembly TaskAction="GetInfo"
NetAssembly="$(SetupAssembly)">
<Output TaskParameter="OutputItems" ItemName="Info" />
</MSBuild.ExtensionPack.Framework.Assembly>
<Message Text="Assembly File Version: %(Info.FileVersion)" />
%(Info.FileVersion) will have the AssemblyFileVersion of $(SetupAssembly).
--
John Merryweather Cooper
Build & Install Engineer - ESA
Jack Henry & Associates, Inc.®
Shawnee Mission, KS 66227
Office: 913-341-3434 x791011
[email protected]
www.jackhenry.com
-----Original Message-----
From: Marco Tognacci [mailto:[email protected]]
Sent: Thursday, March 27, 2014 6:25 PM
To: [email protected]
Subject: [WiX-users] Take version number from file not installed in the package
I need to get the version number for an msi from an exe file that isn't
deployed as item from the msi?Is there a way to get the file versione from a
file using his folder path?
in the same way I need to set the version of an exe setup package added in a
Burn setup to make it upgrading correctly.I think I can add the version number
using a "Provides element" from "DependencyExtension" but I don't know how to
set it automatically to the version number of the exe file itself.
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
NOTICE: This electronic mail message and any files transmitted with it are
intended
exclusively for the individual or entity to which it is addressed. The message,
together with any attachment, may contain confidential and/or privileged
information.
Any unauthorized review, use, printing, saving, copying, disclosure or
distribution
is strictly prohibited. If you have received this message in error, please
immediately advise the sender by reply email and delete all copies.
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users