Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to get version of the installer-project

How to get version of the installer-project

Scheduled Pinned Locked Moved C#
csharptutorialquestionannouncementlounge
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ariadne
    wrote on last edited by
    #1

    Hi, I'd like to use the version of the installer-project (set in the project properties) as a general version of the whole application (as defined in the AssemblyInfo.cs). Is there an C#-object, which is able to read the visual-studio properties, in special the version of the installer project? Thanks!

    Ariadne

    S A 2 Replies Last reply
    0
    • A Ariadne

      Hi, I'd like to use the version of the installer-project (set in the project properties) as a general version of the whole application (as defined in the AssemblyInfo.cs). Is there an C#-object, which is able to read the visual-studio properties, in special the version of the installer project? Thanks!

      Ariadne

      S Offline
      S Offline
      sathish s
      wrote on last edited by
      #2

      In vb.net Dim strversion As String strversion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() MessageBox.Show(strversion) strversion = System.Reflection.Assembly.GetCallingAssembly().GetName().Version.ToString() MessageBox.Show(strversion)

      A 1 Reply Last reply
      0
      • S sathish s

        In vb.net Dim strversion As String strversion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() MessageBox.Show(strversion) strversion = System.Reflection.Assembly.GetCallingAssembly().GetName().Version.ToString() MessageBox.Show(strversion)

        A Offline
        A Offline
        Ariadne
        wrote on last edited by
        #3

        Thanks sathish s! Your solution shows the version of the actual running assembly. But my question is related to VS-Enviroment: I need a link to the version of the installer-project property. perhaps VS has a build-in variable [InstallerProjectVersion] or there is a way to investigate the running VS enviroment to get this version.

        Ariadne

        1 Reply Last reply
        0
        • A Ariadne

          Hi, I'd like to use the version of the installer-project (set in the project properties) as a general version of the whole application (as defined in the AssemblyInfo.cs). Is there an C#-object, which is able to read the visual-studio properties, in special the version of the installer project? Thanks!

          Ariadne

          A Offline
          A Offline
          Ariadne
          wrote on last edited by
          #4

          Yes there is a way, but a dirty one: read the file .vdproj

          Ariadne

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups