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. Version Info

Version Info

Scheduled Pinned Locked Moved C#
businesshelptutorialquestionannouncement
5 Posts 3 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.
  • H Offline
    H Offline
    hammerstein05
    wrote on last edited by
    #1

    Hi, Because of the requirements of my project, I have to create a downloader/updater installation. I've got the download part working just fine, but when I loop through the dlls to decide which versions I overwrite I've come across a problem. As soon as I do Assembly.LoadFile( toFile) to get the version information of the from and to dlls they are loaded into the AppDomain. So, I've been reading and it seems I have to create a new AppDomain, but no matter what example I find I can't follow it from there. All the examples seem to assume I'm going to want to use the loaded assemblies to create something. I'm simply wanting to do a straight comparison of version info (the app is nothing complex) and replace if newer in version numbering. Any ideas / hints?

    L S 2 Replies Last reply
    0
    • H hammerstein05

      Hi, Because of the requirements of my project, I have to create a downloader/updater installation. I've got the download part working just fine, but when I loop through the dlls to decide which versions I overwrite I've come across a problem. As soon as I do Assembly.LoadFile( toFile) to get the version information of the from and to dlls they are loaded into the AppDomain. So, I've been reading and it seems I have to create a new AppDomain, but no matter what example I find I can't follow it from there. All the examples seem to assume I'm going to want to use the loaded assemblies to create something. I'm simply wanting to do a straight comparison of version info (the app is nothing complex) and replace if newer in version numbering. Any ideas / hints?

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      hammerstein05 wrote:

      Any ideas / hints?

      Windows Installer[^]

      led mike

      1 Reply Last reply
      0
      • H hammerstein05

        Hi, Because of the requirements of my project, I have to create a downloader/updater installation. I've got the download part working just fine, but when I loop through the dlls to decide which versions I overwrite I've come across a problem. As soon as I do Assembly.LoadFile( toFile) to get the version information of the from and to dlls they are loaded into the AppDomain. So, I've been reading and it seems I have to create a new AppDomain, but no matter what example I find I can't follow it from there. All the examples seem to assume I'm going to want to use the loaded assemblies to create something. I'm simply wanting to do a straight comparison of version info (the app is nothing complex) and replace if newer in version numbering. Any ideas / hints?

        S Offline
        S Offline
        Scott Dorman
        wrote on last edited by
        #3

        Why do you need to do Assembly.LoadFile? Wouldn't FileVersionInfo work as well? This can be used to read the version data from the DLL without loading it into the AppDomain.

        ----------------------------- In just two days, tomorrow will be yesterday.

        H 1 Reply Last reply
        0
        • S Scott Dorman

          Why do you need to do Assembly.LoadFile? Wouldn't FileVersionInfo work as well? This can be used to read the version data from the DLL without loading it into the AppDomain.

          ----------------------------- In just two days, tomorrow will be yesterday.

          H Offline
          H Offline
          hammerstein05
          wrote on last edited by
          #4

          Ahh, thank-you. I am relatively new to the .NET world and like so many, learning as I go.

          S 1 Reply Last reply
          0
          • H hammerstein05

            Ahh, thank-you. I am relatively new to the .NET world and like so many, learning as I go.

            S Offline
            S Offline
            Scott Dorman
            wrote on last edited by
            #5

            hammerstein05 wrote:

            Ahh, thank-you. I am relatively new to the .NET world and like so many, learning as I go.

            No problem. In my opinion, the FileVersionInfo class is a bit hidden to be commonly used. The best way to learn is to try and find the answer yourself and when that fails (or doesn't work the way you want/expect it to) ask questions. We all learn as we go, as everyone has different experience with the Framework.

            ----------------------------- In just two days, tomorrow will be yesterday.

            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