|
-
May 5th, 2003, 08:52 PM
#1
Thread Starter
Lively Member
Get a Version number for an ASP Project/Assembly??
Hi,
Is it possible to get a version number for an ASP.NET project or Assembly?
I know that ASP.NET assigns my project a version number - it can be specified in AssemblyInfo.vb. I can also see it in the project.dll that gets created.
My question is how can I access it at runtime (to display/reference)
I thought I might be able to access it via:
Code:
System.Reflection.Assembly.Version
or similar, but I can't seem to get it.
Any ideas??
Thanks,
Tim
-
May 5th, 2003, 09:21 PM
#2
Frenzied Member
Try this
Code:
Assembly asm;
asm = Assembly.GetExecutingAssembly();
Response.Write(asm.GetName().Name + " " + asm.GetName().Version.Major + "." + asm.GetName().Version.Minor + "." + asm.GetName().Version.Build);
-
May 6th, 2003, 12:51 AM
#3
Thread Starter
Lively Member
Thanks DevGrp,
I had to tweak it to run in VB .. for the record here is the code:
Code:
Dim asm As System.Reflection.Assembly
asm = System.Reflection.Assembly.GetExecutingAssembly()
mClientCL.UPAlert(asm.GetName().Name & " " & _
asm.GetName().Version.Major & "." & asm.GetName().Version.Minor & "." & _
asm.GetName().Version.Build & "." & asm.GetName().Version.Revision)
Tim
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
|