0

I have few dlls in a network folder where I will have new versions. When I run my application I want to check if there are a new version, so I get the version of the dll that is in the network folder.

Imagine that the dll has a size of 3MB. To get the version of the dll I have to download the 3MB of the dll to the local computer that runs the application or when I get the version can get if if needed to transfer all the dll?

Because if I have to transfer all the 3MB, I was thinking to have a text file with the version of the dll to avoid to get all the dll to only check the version, because how I have few dlls could be slow the start up of the application and I would like to avoid this, and save data if the user is using a mobile data connection.

The way that I am getting the version of a dll is with this code:

Assembly assembly = Assembly.LoadFrom(myPathToDll);
Version ver = assembly.GetName().Version;

Thanks.

Álvaro García
  • 18,114
  • 30
  • 102
  • 193
  • 2
    Possible duplicate of [Programmatically get the version number of a DLL](http://stackoverflow.com/questions/1755504/programmatically-get-the-version-number-of-a-dll) – Samvel Petrosov May 18 '17 at 07:30
  • 1
    Look at this answer of that question http://stackoverflow.com/a/14612480/6064728 ,not the accepted – Samvel Petrosov May 18 '17 at 07:31
  • It Is not clear why you have to "download" anything when it is on a network folder. Consider that you can make *myPathToDll* a bit smarter, you can encode the version number in the directory name. Or consider ClickOnce deployment so this is all completely automagic. – Hans Passant May 18 '17 at 07:54
  • When I said "download" i mean load in memory in the local computer, so I have to transfer the complete dll, 3Mb in this case, and I wanted to know if there are any other way to get the version without load the dll. In the S. Petrosov link they talk about two options that don't need to load the dll in memory and avoid to transfer all the complete dll from the remote computer to the local one. – Álvaro García May 18 '17 at 08:57

0 Answers0