ASP.Net 2.0 - assembly info?

R

Rob Meade

Hi all,

Having used to be able to specify the version numbers for my applications I
am a bit of a loss with regards to what to do now...from what I've read
(skimmed through to be honest) on the net it would seem that assembly.info
is no more and that .net handles all of the version itself....

Is there anyway to override these settings? If so - anyone got an example?

The reason I ask is that we specifically set version numbers for our
applications, these numbers tallied up with requirement/technical
specifications, in addition, I had a web control which retrieve this data
from the assembly and slapped it on the page (in the copyright footer at the
bottom of each page) - the same control is running but now I get some
gobble-de-gook...

Code from the WebControl:

Private Sub DisplayApplicationNameAndVersion()

' declare variables
Dim ApplicationVersion As Version
Dim ApplicationName As String

' populate variables
ApplicationVersion = [Assembly].GetExecutingAssembly.GetName.Version
ApplicationName =
[Assembly].GetExecutingAssembly.GetName.Name.ToString

' display application name and version
lblApplicationNameAndVersion.Text = ApplicationName & " v" &
ApplicationVersion.ToString(2)

End Sub

What I get now:

App_Web_owic-a5s v0.0

So, as you can see, the name isn't actually the name of my current project,
and the version number is 0!

Any help with this would be really appreciate - I'd like to modify my code
if possible to either pick up on the values .net is now setting, or, better
still, go back to being able to set them easily myself...ironically it seems
that if I write a Windows app I can still specify these!

Thanks for any help

Regards

Rob
 
K

Karl Seguin

arrg...sorry..

Take a look at:
http://odetocode.com/Blogs/scott/archive/2006/01/24/2786.aspx

If that doesn't do it for you, I suggest you look at using the Web
Application Project: http://msdn2.microsoft.com/en-us/asp.net/aa336618.aspx
(free)

which makes VS.NET 2005 web projects work like 2003 projects...I use it
almost exclusively...

Karl

--
http://www.openmymind.net/
http://www.codebetter.com/


Karl Seguin said:
Take a look at:

--
http://www.openmymind.net/
http://www.codebetter.com/


Rob Meade said:
Hi all,

Having used to be able to specify the version numbers for my applications
I
am a bit of a loss with regards to what to do now...from what I've read
(skimmed through to be honest) on the net it would seem that
assembly.info
is no more and that .net handles all of the version itself....

Is there anyway to override these settings? If so - anyone got an
example?

The reason I ask is that we specifically set version numbers for our
applications, these numbers tallied up with requirement/technical
specifications, in addition, I had a web control which retrieve this data
from the assembly and slapped it on the page (in the copyright footer at
the
bottom of each page) - the same control is running but now I get some
gobble-de-gook...

Code from the WebControl:

Private Sub DisplayApplicationNameAndVersion()

' declare variables
Dim ApplicationVersion As Version
Dim ApplicationName As String

' populate variables
ApplicationVersion =
[Assembly].GetExecutingAssembly.GetName.Version
ApplicationName =
[Assembly].GetExecutingAssembly.GetName.Name.ToString

' display application name and version
lblApplicationNameAndVersion.Text = ApplicationName & " v" &
ApplicationVersion.ToString(2)

End Sub

What I get now:

App_Web_owic-a5s v0.0

So, as you can see, the name isn't actually the name of my current
project,
and the version number is 0!

Any help with this would be really appreciate - I'd like to modify my
code
if possible to either pick up on the values .net is now setting, or,
better
still, go back to being able to set them easily myself...ironically it
seems
that if I write a Windows app I can still specify these!

Thanks for any help

Regards

Rob
 
R

Rob Meade

...
arrg...sorry..

Take a look at:
http://odetocode.com/Blogs/scott/archive/2006/01/24/2786.aspx

If that doesn't do it for you, I suggest you look at using the Web
Application Project:
http://msdn2.microsoft.com/en-us/asp.net/aa336618.aspx (free)

which makes VS.NET 2005 web projects work like 2003 projects...I use it
almost exclusively...

Hi Karl,

Many thanks for the replies - I'll take a read through that first link in a
sec - with regards to using the Web Application Project to kinda map back to
VS2003 - are there any downsides of that? ie, are there then parts of VS2005
that you cant use/dont work? Please excuse my ignorance, ie, if this seems
like a daft question - I'm just not familiar with it.

Regards

Rob
 
K

Karl Seguin

Yes/No.

From a 2003 point of view, it's almost identical.

If you are looking at it frmo the way things are in 2005, you'll lose a
bit -namely in how you can deploy your code. The 2005 model is a lot more
flexible than the 2003 one - allowing to deploy everything (codebehing
included) and have it JIT or deploy everything (.aspx included) compiled...

Karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top