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. VS2005 deployment / installer project: copy version data around

VS2005 deployment / installer project: copy version data around

Scheduled Pinned Locked Moved C#
announcementsysadmintutorialquestion
5 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.
  • J Offline
    J Offline
    Jan R Hansen
    wrote on last edited by
    #1

    Hi, In my solution I have a project for the application and the installer project. The installer builds "Applicationname install.msi", and everything works great. What I would like to do is this: Simple solution: Get the installer project to build "applicationname install .msi" instead of just "applicationname install.msi" which I then have to rename manully afterwards. Is this possible ? Optimal solution: Checking files into subversion creates an assemblyinfo.cs with the number 1.0.0. or something. I know how to do this. I could also update the "installerprojectfile.vdproj" to reflect this, although this would change the status of the .vdproj file subversion-wise... ah well.. But that would allow me to automatically update the version in the installer - and if I could get that version reflected in the installer filename I would be home safe :) Anyway - has anybody a clue regarding the simple solution ? Is it possible at all in the build-in deployment project ? /Jan

    Do you know why it's important to make fast decisions? Because you give yourself more time to correct your mistakes, when you find out that you made the wrong one. Chris Meech on deciding whether to go to his daughters graduation or a Neil Young concert

    N 1 Reply Last reply
    0
    • J Jan R Hansen

      Hi, In my solution I have a project for the application and the installer project. The installer builds "Applicationname install.msi", and everything works great. What I would like to do is this: Simple solution: Get the installer project to build "applicationname install .msi" instead of just "applicationname install.msi" which I then have to rename manully afterwards. Is this possible ? Optimal solution: Checking files into subversion creates an assemblyinfo.cs with the number 1.0.0. or something. I know how to do this. I could also update the "installerprojectfile.vdproj" to reflect this, although this would change the status of the .vdproj file subversion-wise... ah well.. But that would allow me to automatically update the version in the installer - and if I could get that version reflected in the installer filename I would be home safe :) Anyway - has anybody a clue regarding the simple solution ? Is it possible at all in the build-in deployment project ? /Jan

      Do you know why it's important to make fast decisions? Because you give yourself more time to correct your mistakes, when you find out that you made the wrong one. Chris Meech on deciding whether to go to his daughters graduation or a Neil Young concert

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      You can change the name by going to the properties of the setup project and changing the Output file name. You can setup a postbuild event in the insall project to update the filename with version number.

      only two letters away from being an asset

      J 1 Reply Last reply
      0
      • N Not Active

        You can change the name by going to the properties of the setup project and changing the Output file name. You can setup a postbuild event in the insall project to update the filename with version number.

        only two letters away from being an asset

        J Offline
        J Offline
        Jan R Hansen
        wrote on last edited by
        #3

        aha... thanks for the answer, Mark. I have to select the install project and then the properties tab in order to get the list of project properties (right clicking and selecting properties brings up a dialog with nothing relevant). In the list of project properties I can specify a post-build event, which brings up a dialog with these three macros: $(BuiltOuputPath) $(Configuration) $(ProjectDir) which are, in turn, c:\...\folder\debug\applicationname.msi Debug c:\...\folder\ So I could write something like rename $(BuiltOuputPath) $(ProjectDir)$(Configuration)\appliactionname .msi which would expand to rename c:\...\folder\debug\applicationname.msi c:\...\folder\debug\applicationname .msi but how do I retrieve the version number here ? If I have to change the post build macro each time I change version I might as well just change the filename manually :) /Jan

        Do you know why it's important to make fast decisions? Because you give yourself more time to correct your mistakes, when you find out that you made the wrong one. Chris Meech on deciding whether to go to his daughters graduation or a Neil Young concert

        N 1 Reply Last reply
        0
        • J Jan R Hansen

          aha... thanks for the answer, Mark. I have to select the install project and then the properties tab in order to get the list of project properties (right clicking and selecting properties brings up a dialog with nothing relevant). In the list of project properties I can specify a post-build event, which brings up a dialog with these three macros: $(BuiltOuputPath) $(Configuration) $(ProjectDir) which are, in turn, c:\...\folder\debug\applicationname.msi Debug c:\...\folder\ So I could write something like rename $(BuiltOuputPath) $(ProjectDir)$(Configuration)\appliactionname .msi which would expand to rename c:\...\folder\debug\applicationname.msi c:\...\folder\debug\applicationname .msi but how do I retrieve the version number here ? If I have to change the post build macro each time I change version I might as well just change the filename manually :) /Jan

          Do you know why it's important to make fast decisions? Because you give yourself more time to correct your mistakes, when you find out that you made the wrong one. Chris Meech on deciding whether to go to his daughters graduation or a Neil Young concert

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          You have to get a little more creative, think outside teh macro box. Write a script(WSH) or simple console app that can be called from the post build event which will read the file for version infor and update the msi file name.

          only two letters away from being an asset

          J 1 Reply Last reply
          0
          • N Not Active

            You have to get a little more creative, think outside teh macro box. Write a script(WSH) or simple console app that can be called from the post build event which will read the file for version infor and update the msi file name.

            only two letters away from being an asset

            J Offline
            J Offline
            Jan R Hansen
            wrote on last edited by
            #5

            I see.. No built in support for this kind of advanced scheme :o) Strange that you can't get project properties like version in the macro. However, no matter how much out of the macro box I think, I still cant see how I can retrieve the project version number from the msi file. Got any ideas for that ?

            Do you know why it's important to make fast decisions? Because you give yourself more time to correct your mistakes, when you find out that you made the wrong one. Chris Meech on deciding whether to go to his daughters graduation or a Neil Young concert

            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