Assembly Version

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Aamir Mahmood

    Assembly Version

    Hi all,
    How can I set the version information (major, minor) in my assembly.
    And also how can I easily get it at runtime?

    -
    AM


  • Shiva

    #2
    Re: Assembly Version

    If you are using Visual Studio .NET IDE created projects, then the file
    AssemblyInfo.cs has the AssemblyVersion attribute to spefify the version.

    To get the version info at runtime: Assembly.GetNam e().Version

    "Aamir Mahmood" <a@b.c> wrote in message
    news:OEt5c9e1EH A.3596@TK2MSFTN GP12.phx.gbl...
    Hi all,
    How can I set the version information (major, minor) in my assembly.
    And also how can I easily get it at runtime?

    -
    AM



    Comment

    • Arrowken

      #3
      Re: Assembly Version

      On Mon, 29 Nov 2004 13:42:25 +0500, "Aamir Mahmood" <a@b.c> wrote:
      [color=blue]
      >Hi all,
      >How can I set the version information (major, minor) in my assembly.
      >And also how can I easily get it at runtime?
      >
      >-
      >AM
      >[/color]
      Take a look at -> AssemblyInfo.cs

      System.Reflecti on.Assembly a =
      System.Reflecti on.Assembly.Get ExecutingAssemb ly();

      System.Reflecti on.AssemblyName an = a.GetName();
      Version v = an.Version;

      Comment

      • Manish.net

        #4
        Re: Assembly Version

        Whenever you create project using VS.Net , IDE automatically creates file
        name AssemblyInfo.cs or AssemblyInfo.vb . This file consists of attribute named
        "<Assembly: AssemblyVersion ("1.0.*")> " here you can specify version number
        of your assembly.

        To get version number at run time you can use following static function of
        Assembly class "Assembly.GetNa me().Version"

        Regards
        Manish



        "Shiva" wrote:
        [color=blue]
        > If you are using Visual Studio .NET IDE created projects, then the file
        > AssemblyInfo.cs has the AssemblyVersion attribute to spefify the version.
        >
        > To get the version info at runtime: Assembly.GetNam e().Version
        >
        > "Aamir Mahmood" <a@b.c> wrote in message
        > news:OEt5c9e1EH A.3596@TK2MSFTN GP12.phx.gbl...
        > Hi all,
        > How can I set the version information (major, minor) in my assembly.
        > And also how can I easily get it at runtime?
        >
        > -
        > AM
        >
        >
        >
        >[/color]

        Comment

        Working...