> I know how to retrieve the Assembly Version for a WinForm program :
Application.ProductVersion.
But how to do it for a windows service in C# ???
The assembly version is part of the assembly's name which can be retrieved
from the FullName property. Like this:
Assembly.GetExecutingAssembly().FullName
The full name has this form:
assembly name, Version=x.x.xxxx.xxxxx, Culture=culture, PublicKeyToken=token
where assembly name is the name of the assembly
x'es are numbers (the info you are looking for)
culture is the culture the assembly is complied for, usually neutral if the
assembly is not a satelite assembly
the public key token is used for strong name assemblies.
Anders Norås
http://dotnetjunkies.com/weblog/anoras/