Notice that assemblies have 2 versions:
- AssemblyVersionAttribute: the version of the assembly. This attribute
always appears in the assemblyinfo.cs file.
- AssemblyFileVersionAttribute: the Win32 version of the file (if omitted,
it is set to the assembly version)
To get the first. you must get the executing assembly with
System.Reflection.Assembly.GetExecutingAssembly() and then the GetName()
method returns an AssemblyName object which has a Version property.
To get the second, once you have the executing assembly you can retrieve its
attributes until you find the AssemblyFileVersionAttribute attribute.
--
Carlos J. Quintero
MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com