Link to home
Start Free TrialLog in
Avatar of mpf1748
mpf1748Flag for United States of America

asked on

Setting/Obtaining Version Info in C++.Net v1.0

Hi,

Is there a reliable way of setting and obtaining file version info in C++.Net v1.0? I can "successfully" set the version of the file by setting the AssemblyVersionAttribute (and AssemblyFileVersionAttribute) in AssemblyInfo.cpp, but the only way I can view this is by opening the file in ILDASM - not by positioning my mouse over the file or in the properties. However, this would be fine, except I cannot get the version progammatically. I've used Application, Form, and FileVersionInfo to no avail. Is there a way to set the version so that you can get the version programmatically in VC++.Net v1.0?

Thanks,
mpf1748
ASKER CERTIFIED SOLUTION
Avatar of javanic
javanic

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mpf1748

ASKER

Thanks.

Not as easy as I was hoping, but it works. There is Assembly::GetExecutingAssembly() that simply returns the original assembly that is loaded if that's the assembly you want the version from. Although you still have to parse out that Version.

mpf1748
Avatar of mpf1748

ASKER

Actually that is the current current assembly, not the original executing assembly.