471,618 Members | 1,197 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,618 software developers and data experts.

Querying the current assembly for version info

I'm trying to figure out how to query an assembly (in this case an aspx
code-behind DLL) for its current version (major, minor, build, ...), and
basically expose it as a property...

public string Version
{
get
{
string version;
version = ....; // code to extract version info from assembly
return version;
}
}
Jan 4 '06 #1
1 2974
Nate,

If you have a reference to the assembly in question, you can call the
GetName method, which will return an AssemblyName instance for that
assembly. From there, you can access the Version property to get the
version details of the assembly.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Nate" <Na**@discussions.microsoft.com> wrote in message
news:34**********************************@microsof t.com...
I'm trying to figure out how to query an assembly (in this case an aspx
code-behind DLL) for its current version (major, minor, build, ...), and
basically expose it as a property...

public string Version
{
get
{
string version;
version = ....; // code to extract version info from assembly
return version;
}
}

Jan 4 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Greg | last post: by
10 posts views Thread by jojobar | last post: by
2 posts views Thread by Dylan Parry | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.