version information

  • Thread starter Thread starter glenn
  • Start date Start date
G

glenn

Where do you enter your version information about your exe so that you can
tell what version of the exe you are looking at?

Thanks,

cybercrypt
 
Look in the AssemblyInfo.[cs or vb] file that is created as part of the
project. You can set the exe version number using the AssemblyVersion
attribute.

(C#)
[assembly: AssemblyVersion("1.0.*")]
(VB.Net)
<Assembly: AssemblyVersion("1.0.*")>

To programmatically get the version number at runtime, place the following
line of code somewhere in your exe.
(C#)
Version v =
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
 
In addition to the assemblyversion look up the InformationalVersion (product
version):
http://msdn.microsoft.com/library/d...lyinformationalversionattributeclasstopic.asp

If you want to give your exe a different file version (to the assembly
version) check out Neil's blog entry:
http://blog.opennetcf.org/ncowburn/PermaLink,guid,e5babf15-ebb3-47b0-b072-957e6f3ccc85.aspx

Cheers
Daniel
--
http://www.danielmoth.com/Blog/


Tim Wilson said:
Look in the AssemblyInfo.[cs or vb] file that is created as part of the
project. You can set the exe version number using the AssemblyVersion
attribute.

(C#)
[assembly: AssemblyVersion("1.0.*")]
(VB.Net)
<Assembly: AssemblyVersion("1.0.*")>

To programmatically get the version number at runtime, place the following
line of code somewhere in your exe.
(C#)
Version v =
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;

--
Tim Wilson
.Net Compact Framework MVP

glenn said:
Where do you enter your version information about your exe so that you
can
tell what version of the exe you are looking at?

Thanks,

cybercrypt
 
Back
Top