|
-
Apr 29th, 2003, 02:44 PM
#1
Thread Starter
Fanatic Member
Access the AssemblyInfo.vb from a DLL
Does anyone know how to get the version out of the assembly info file for a DLL.
You can just do Application.ProductVersion in an exe to get the version, but doing this in a dll that is called from the exe just returns the exe’s version.
Thanks in advance.
-
Apr 29th, 2003, 03:09 PM
#2
PowerPoster
Code:
private void button1_Click(object sender, System.EventArgs e) {
System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
string version = a.GetName().Version.Major + "." + a.GetName().Version.Minor + "." + a.GetName().Version.Revision;
MessageBox.Show(version);
}
-
Apr 29th, 2003, 03:25 PM
#3
Thread Starter
Fanatic Member
Hey! Thought this was a VB forum. LOL.
Thanks for the code, it worked perfectly. Good 'ol reflection.
-
Apr 29th, 2003, 03:28 PM
#4
PowerPoster
C#, VB.NET, J#, what's the difference, were all friends here...
-
Apr 29th, 2003, 03:57 PM
#5
Frenzied Member
I was dealing with the same issue. but needed GUID Lethal code works perfect but I couldnt get GUID using the same method. So i used
System.Runtime.InteropServices.GuidAttribute
Just in case u need that.
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|