Version Info
-
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?
-
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?
-
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?
Why do you need to do
Assembly.LoadFile
? Wouldn'tFileVersionInfo
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.
-
Why do you need to do
Assembly.LoadFile
? Wouldn'tFileVersionInfo
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.
Ahh, thank-you. I am relatively new to the .NET world and like so many, learning as I go.
-
Ahh, thank-you. I am relatively new to the .NET world and like so many, learning as I go.
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.