Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys could someone tell me if it is possible to compare the version 2 dll files that are the same but the newer version has changes ofcourse and if its possible to replace the old one with the newer one if the old one has been referenced in your code. If its possible can someone give me a hint where to start pls.

What I have tried:

ive tried searching online. I've found i few articles but none of them are specific to my problem.
Posted
Updated 22-Oct-17 22:36pm
Comments
Member 13475897 23-Oct-17 4:26am    
I've succeeded, thanks all!!
GKP1992 23-Oct-17 5:12am    
It would be better to let everyone know what worked for you, since you have accepted every answer. :D
Member 13475897 23-Oct-17 5:17am    
solution 1 worked best for me since the others was more advanced and i didnlt need that much info :D

You can make use of the System.Reflection library to get the information about any assembly. The property you're looking for is Version property of the AssemblyName class.

For more details check out this MSDN article.

Have a good day.
 
Share this answer
 
Comments
Member 13475897 23-Oct-17 3:11am    
Thanks
If all you are after is information about the file version; use the FileVersionInfo[^] class. It does exactly what the name suggests. For instance, if you want the file version, you would do this:
C#
FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(filePath);
string productVersion = versionInfo.FileVersion;
 
Share this answer
 
Comments
Member 13475897 23-Oct-17 4:25am    
Thanks
Please take a look
I think it's fit your request.
Compare Two DLL Files Programmatically Using Hash[^]
 
Share this answer
 
Comments
Member 13475897 23-Oct-17 4:51am    
Thanks helped alot

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900