Click here to Skip to main content
15,893,622 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have used "caddatabase.dll" in my project,i want to get the version number of the dll..how to do this??


thanks in advance
Posted

Assembly assembly = Assembly.LoadFrom("MyAssembly.dll");
Version ver = assembly.GetName().Version;


You can get the version of the dll as i mentioned here.
 
Share this answer
 
v2
Comments
girish sp 18-Mar-11 3:26am    
thanks for ur reply..
girish sp 18-Mar-11 4:53am    
i have used loadfrom("myassembly.dll");can i pass the dll located path as argument to assembly.loadfrom(path)??
Espen Harlinn 18-Mar-11 5:10am    
Right, my 5
[no name] 18-Mar-11 5:22am    
Thanks Espen.
girish sp 18-Mar-11 5:37am    
@ramalinga-can u pls give me the syntax by passing the path..i tried but its giving exception as "could not find module".i m sure that the dll is present in that path.
Try something like:
C#
Assembly assembly = Assembly.LoadFrom("MyCustomAssembly.dll");
Version ver = assembly.GetName().Version;



You can also use System.Reflection.Assembly.Load() methods and then get all the information in AssemblyInfo: Assembly.Load Method[^]
 
Share this answer
 
Comments
girish sp 18-Mar-11 4:42am    
i have used loadfrom("myassembly.dll");can i pass the dll located path as argument to assembly.loadfrom(path)??
Espen Harlinn 18-Mar-11 5:10am    
Right, my 5
Sergey Alexandrovich Kryukov 18-Mar-11 23:51pm    
Correct, a 5.
--SA

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