Results 1 to 4 of 4

Thread: How to get the version of my App? **SOLVED**

  1. #1

    Thread Starter
    Hyperactive Member Sgt-Peppa's Avatar
    Join Date
    Mar 2003
    Location
    Munich - Germany
    Posts
    476

    Exclamation How to get the version of my App? **SOLVED**

    Hey, i have a small app and I want to get the version of my Application through code. I know its stored in AssemblyInfo. But how to extract it from there? Is there something that equals the app variable from VB?

    Thanx, Stephan
    Last edited by Sgt-Peppa; Aug 8th, 2003 at 04:13 AM.
    Keep Smiling - even if its hard
    Frankie Says Relax, wossname Says Yeah!
    wossname:--Currently I'm wearing a gimp suit and a parachute.
    C# - Base64 Blog

  2. #2

    Thread Starter
    Hyperactive Member Sgt-Peppa's Avatar
    Join Date
    Mar 2003
    Location
    Munich - Germany
    Posts
    476
    heres a solution for all interested.

    Code:
    using System.Reflection;
    Assembly assembly = Assembly.GetCallingAssembly();
    AssemblyName assemblyname = assembly.GetName();
    Version assemblyver = assemblyname.Version;
    txtResutl.text = assemblyver.toString();
    Stephan
    Keep Smiling - even if its hard
    Frankie Says Relax, wossname Says Yeah!
    wossname:--Currently I'm wearing a gimp suit and a parachute.
    C# - Base64 Blog

  3. #3
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    you could always do this ...
    VB Code:
    1. MessageBox.Show(System.Reflection.Assembly.GetCallingAssembly().GetName().Version.ToString());

    and i'm not to sure what the Environment.Version is , but ...
    VB Code:
    1. MessageBox.Show(Environment.Version.ToString());
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  4. #4
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    you can also do this.....
    VB Code:
    1. MessageBox.Show(System.Environment.CommandLine.GetType().Assembly.GetName().Version.ToString());
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width