473,776 Members | 1,565 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Version of the code behind Assembly

In ASP.NET 1.1 I used to retreive the version of my code-behind assembly
using following syntax:
Assembly.GetExe cutingAssembly( ).GetName().Ver sion
The version was defined in AssemblyInfo.cs using
[assembly: AssemblyVersion ("1.10.*")]

After migrating to ASP.NET 2.0 this line of code always return 0.0.0.0. How
do I retreive the assembly version of ASP.NET application?

Thanks
Jan 23 '06 #1
1 2074
Hi Andrewb,

Welcome to ASPNET newsgroup.
Regarding on the querying asp.net 2.0 web application's assembly version
problem it is actually due to the new compilation model of ASP.NET 2.0 web
application and vs 2005 website project. In ASP.NET 2.0 and vs 2005, we no
longer have a precompiled assembly (dll) in the "bin" dir for the
application's code behind classes or any other component classes... ,
instead it make those classes be dynamically compiled at runtime or fully
precompiled at deployment time(if we use the publish web site in vs 2005 or
use aspnet_compiler .exe command line tool).... So when we use
Assembly.GetExe cutingAssembly( ).GetName().Ver sion

it is actually querying the dynamic compiled assembly's version which will
be 0.0.0.0 ..... You can also find some other threads and article in
newsgroup or web forum indicating this.

Currently, since we did receive many customers and community members's
feedback on the old project assembly and compilation model, the ASP.NET
team is about to provide two new project type , one is for web
application's deployment, which can help do some customization on the final
precompiled assembly, such as apply version number or strong-name ...

And another project is used for provide the ASP.NET 1.1/VS2003 like project
type which will let us compiled a single main assembly for each web
application. Here are the links to their beta preview site on msdn center:

#Visual Studio 2005 Web Application Projects (Beta Preview)
http://msdn.microsoft.com/asp.net/re...p/default.aspx
#Visual Studio 2005 Web Deployment Projects (Beta Preview)
http://msdn.microsoft.com/asp.net/re...p/default.aspx

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Thread-Topic: Version of the code behind Assembly
| thread-index: AcYga9vfI831AFx yTGGe4U+2CCvIvQ ==
| X-WBNR-Posting-Host: 68.148.0.205
| From: =?Utf-8?B?QW5kcmV3?= <an*****@commun ity.nospam>
| Subject: Version of the code behind Assembly
| Date: Mon, 23 Jan 2006 14:25:04 -0800
| Lines: 10
| Message-ID: <54************ *************** *******@microso ft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GXA03.phx.gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3729 90
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| In ASP.NET 1.1 I used to retreive the version of my code-behind assembly
| using following syntax:
| Assembly.GetExe cutingAssembly( ).GetName().Ver sion
| The version was defined in AssemblyInfo.cs using
| [assembly: AssemblyVersion ("1.10.*")]
|
| After migrating to ASP.NET 2.0 this line of code always return 0.0.0.0.
How
| do I retreive the assembly version of ASP.NET application?
|
| Thanks
|

Jan 24 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

37
5993
by: Alan Silver | last post by:
Hello, Newbie here, so please forgive what is probably a basic question ... I see a lot of discussion about "code behind", which if I have understood correctly, means that the script code goes in a separate file from the HTML. Apart from the obvious advantage if you have a separate designer and programmer, are there any other advantages to code behind? Most of the stuff I've seen so far uses code inside, but that's probably
171
7796
by: tshad | last post by:
I am just trying to decide whether to split my code and uses code behind. I did it with one of my pages and found it was quite a bit of trouble. I know that most people (and books and articles) like it because you can split the code from the design. That is logical. But if you are the only one working on the code, it seem a little overkill. I use Dreamweaver to do my design and find it a bit of a hassle to have multiple files open...
2
1980
by: N. Demos | last post by:
I have a user control with code behind of which two instances are created/declared in my aspx page. The aspx page has code behind also, as I need to access methods of the usercontrols on page submit. I've read several post here and articles on the web on this topic. What little I have learned from them is that you have to pre-compile the usercontrol in order to access it in the aspx code behind. I did this, compiling the usercontrol...
7
2886
by: Alan Silver | last post by:
Hello, I am just looking at VWD and seeing what needs doing to take an existing site I've written by hand and importing it into VWD. I've already discovered that I need to rename my code-behind files to match the .aspx file name so VWD will tie the two together, and I'm now wondering what to do about the location of the code-behind files. Is there any set convention for where the code-behind files live? I have been putting them in the...
1
3213
by: javatopia | last post by:
Hello, In my ASP.NET (1.1) project, I look for the current version of the assembly: Version vv = GetType().Assembly.GetName().Version; return("v" + vv.ToString()); I am always seeing "v0.0.0.0" for the output, even though I set the version in the assembly.cs file explicitly:
1
3059
by: Nate | last post by:
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
7
7818
by: Sky | last post by:
I have been looking for a more powerful version of GetType(string) that will find the Type no matter what, and will work even if only supplied "{TypeName}", not the full "{TypeName},{AssemblyName}" As far as I know yet -- hence this question -- there is no 'one solution fits all', but instead there are several parts that have to be put together to check. What I have so far is, and would like as much feedback as possible to ensure I've...
8
3503
by: schaf | last post by:
Hi Ng! My application (version 1 a1) communicates with a service (version 1 s1). Now I would like to update the service and create a service version 2 (s2). The new function calls within s2 are implemented in a new interface, which derive from the old one to ensure that an old version of my application (a1) still works with s2. If i run my new version of the application a2 with s1 I get a InvalidCastException (Return argument has an...
1
1618
by: archana | last post by:
Hi all, I am confuse regarding concept of code behind model and single file model.. I have heard that single file model compiles dynamically. suppose i have application in which i am having one aspx page and its equivalent cs file i completed my application and deployed dll and aspx page.
0
9462
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10119
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10060
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8951
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7469
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6721
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5492
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3621
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.