By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,302 Members | 1,812 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,302 IT Pros & Developers. It's quick & easy.

Build Numbers in ASPX Pages

P: n/a
This may have been covered before but I didn't find anything after
doing a google search.

Does VS.NET 2005 have a way to put build or version numbers within
aspx pages? I'm envisioning an attribute on the page directive or
maybe its own tag. This would be a tremendous help to keep track
whether an application install is the latest version of any particular
page and not just the dll.

Thanks for any ideas,

nautonnier

PS, In case there's any confusion, I'm looking at an automatic way to
do this and not just manually putting in a tag and updating the number
each time a developer updates it (we all know how much we developers
love to update comments).

Mar 13 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
re:
Does VS.NET 2005 have a way to put build or version numbers within aspx pages?
No. That's only available for WinForms apps.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"nautonnier" <ch****@cleanrecords.comwrote in message
news:11*********************@q40g2000cwq.googlegro ups.com...
This may have been covered before but I didn't find anything after
doing a google search.

Does VS.NET 2005 have a way to put build or version numbers within
aspx pages? I'm envisioning an attribute on the page directive or
maybe its own tag. This would be a tremendous help to keep track
whether an application install is the latest version of any particular
page and not just the dll.

Thanks for any ideas,

nautonnier

PS, In case there's any confusion, I'm looking at an automatic way to
do this and not just manually putting in a tag and updating the number
each time a developer updates it (we all know how much we developers
love to update comments).

Mar 13 '07 #2

P: n/a
JJ
The closest I've come with this is using visual source safe version numbers?
Not sure if thats any help or not?

You basically have to turn on this feature in SourceSafe and the following
keywords in a code file are replaced:

$Archive: $
VSS archive file location

$Author: $
User who last changed the file

$Date: $
Date and time of last check in

$Header: $
Logfile, Revision, Date, Author

$History: $
File history, VSS format

$JustDate: $
Date, without the time addendum

$Log: $
File history, RCS format

$Logfile: $
Same as Archive

$Modtime: $
Date and time of last modification

$Revision: $
VSS version number

$Workfile: $
File name

If this is what you are after, but are still confused, post back and I'll
dig up a working example.

Hope this helps,

JJ
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:OZ**************@TK2MSFTNGP03.phx.gbl...
re:
>Does VS.NET 2005 have a way to put build or version numbers within aspx
pages?

No. That's only available for WinForms apps.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"nautonnier" <ch****@cleanrecords.comwrote in message
news:11*********************@q40g2000cwq.googlegro ups.com...
>This may have been covered before but I didn't find anything after
doing a google search.

Does VS.NET 2005 have a way to put build or version numbers within
aspx pages? I'm envisioning an attribute on the page directive or
maybe its own tag. This would be a tremendous help to keep track
whether an application install is the latest version of any particular
page and not just the dll.

Thanks for any ideas,

nautonnier

PS, In case there's any confusion, I'm looking at an automatic way to
do this and not just manually putting in a tag and updating the number
each time a developer updates it (we all know how much we developers
love to update comments).


Mar 14 '07 #3

P: n/a
On Mar 13, 2:39 pm, "nautonnier" <chu...@cleanrecords.comwrote:
This may have been covered before but I didn't find anything after
doing a google search.

Does VS.NET 2005 have a way to put build or version numbers within
aspx pages? I'm envisioning an attribute on the page directive or
maybe its own tag. This would be a tremendous help to keep track
whether an application install is the latest version of any particular
page and not just the dll.

Thanks for any ideas,

nautonnier

PS, In case there's any confusion, I'm looking at an automatic way to
do this and not just manually putting in a tag and updating the number
each time a developer updates it (we all know how much we developers
love to update comments).
I didn't have any problems obtaining the version information
whatsoever. I used Reflection to get it.

Here's the class I whipped up to obtain it:

Option Explicit On
Option Strict On

Imports System.Diagnostics
Imports System.Reflection

Public Class VersionInfo

Public Sub New()
m_assembly = Reflection.Assembly.GetExecutingAssembly()
GetVersionInfo()
End Sub

Public Sub New(ByVal [assembly] As Reflection.Assembly)
m_assembly = [assembly]
GetVersionInfo()
End Sub

Private Sub GetVersionInfo()
m_version = m_assembly.GetName().Version
m_fileversion =
FileVersionInfo.GetVersionInfo(m_assembly.Location )
End Sub

Private m_assembly As Reflection.Assembly
Public ReadOnly Property [Assembly]() As Reflection.Assembly
Get
Return m_assembly
End Get
End Property

Private m_fileversion As FileVersionInfo
Public ReadOnly Property FileVersion() As FileVersionInfo
Get
Return m_fileversion
End Get
End Property

Private m_version As Version
Public ReadOnly Property Version() As System.Version
Get
Return m_version
End Get
End Property

End Class

I suggest instantiating it with the default constructor. If you so
choose, you can pass it a different assembly, and it will report the
version information for that assembly as well, provided that you have
sufficient permissions to the folder where it resides.

This will give you the file and assembly version information for your
executing assembly (usually, the DLL). Now, if you're using a multi-
dll project, you'll want to iterate over the various DLLs in the
project. If that's your case, get back to me, and we'll go over that
as well.

Hope this helps.

Mike Hofer

Mar 14 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.