473,581 Members | 2,607 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3052
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.co m

"Nate" <Na**@discussio ns.microsoft.co m> wrote in message
news:34******** *************** ***********@mic rosoft.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2640
by: Greg | last post by:
I am working on a project that will have about 500,000 records in an XML document. This document will need to be queried with XPath, and records will need to be updated. I was thinking about splitting up the XML into several XML documents (perhaps 50,000 per document) to be more efficient but this will make things a lot more complex because...
11
3421
by: Z D | last post by:
Hello, If I have a .NET assembly, how do I determine what version of the .NET framework it.... 1) was compiled against 2) is supposed to use 3) is compatible with? Is there a utility that will extract this info somehow?
11
3114
by: Wolfgang Kaml | last post by:
I am not sure if this is more of an expert question, but I am sure that they are out there. I'd like to setup a general application or bin directory on my Win2003.Net Server that will hold some useful utils that more pages on that server can use. As an example, I have created a Page Counter class that opens an Access .mdb file, counts the...
10
3431
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read somewhere that each folder under the "web site" is compiled in separate assembly. I however, did not find that the "web site" creation in vs.net...
5
1900
by: Rich | last post by:
Hello, So I develop a vb.net exe on my (win2k) workstation. I have to deploy it to another workstation (actually several - all win2k). Each receiving workstation will have .Net Framework 1.1 (or higher). I place the vb.net exe on the workstation. In vb6 I used to have to run setup if there were any fancy controls on the vb6 exe. So,...
1
10782
by: urs | last post by:
Two days ago, I built an ASP.NET 2.0 application and published it on a shared IIS 6 Web server. After publishing, and during the whole day, it worked fine. The server remained untouched since. Today, I wanted to access the home page of the application again with a browser. But instead of the proper page, I just got an ugly message: ...
2
3808
by: Dylan Parry | last post by:
Hi, Is there a way of getting the date that an assembly was last compiled? I am trying to help myself to remember what version of a particular assembly my Web applications are using, so I've taken to having it output the version number at the bottom of the page using: Assembly a = Assembly.GetExecutingAssembly(); AssemblyName an =...
5
12087
by: Laurence | last post by:
In VS.2005 using VB.NET There are two versions on every project, The Assembly Version and the File Version. Why are there two different versions? As far as I can tell, there is not need for two versions. The assembly is the file, isn't it?
7
20127
by: =?Utf-8?B?RG9u?= | last post by:
I'm using VS2005 to build a C++ assembly. I set a Key File in the linker advanced options for the project so that the assembly would be strong named. I filled out the data in AssemblyInfo.cpp and built the project. But when I use explorer to view properties on the assembly, there is not a version tab as there is on my C# assemblies, so I...
0
7868
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7792
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...
0
8304
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...
0
8175
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6553
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...
0
5364
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...
1
2301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1403
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1138
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.