473,396 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Assembly Version

Hi all,
How can I set the version information (major, minor) in my assembly.
And also how can I easily get it at runtime?

-
AM
Nov 16 '05 #1
3 17382
If you are using Visual Studio .NET IDE created projects, then the file
AssemblyInfo.cs has the AssemblyVersion attribute to spefify the version.

To get the version info at runtime: Assembly.GetName().Version

"Aamir Mahmood" <a@b.c> wrote in message
news:OE**************@TK2MSFTNGP12.phx.gbl...
Hi all,
How can I set the version information (major, minor) in my assembly.
And also how can I easily get it at runtime?

-
AM

Nov 16 '05 #2
On Mon, 29 Nov 2004 13:42:25 +0500, "Aamir Mahmood" <a@b.c> wrote:
Hi all,
How can I set the version information (major, minor) in my assembly.
And also how can I easily get it at runtime?

-
AM

Take a look at -> AssemblyInfo.cs

System.Reflection.Assembly a =
System.Reflection.Assembly.GetExecutingAssembly();

System.Reflection.AssemblyName an = a.GetName();
Version v = an.Version;

Nov 16 '05 #3
Whenever you create project using VS.Net , IDE automatically creates file
name AssemblyInfo.cs or AssemblyInfo.vb. This file consists of attribute named
"<Assembly: AssemblyVersion("1.0.*")> " here you can specify version number
of your assembly.

To get version number at run time you can use following static function of
Assembly class "Assembly.GetName().Version"

Regards
Manish

"Shiva" wrote:
If you are using Visual Studio .NET IDE created projects, then the file
AssemblyInfo.cs has the AssemblyVersion attribute to spefify the version.

To get the version info at runtime: Assembly.GetName().Version

"Aamir Mahmood" <a@b.c> wrote in message
news:OE**************@TK2MSFTNGP12.phx.gbl...
Hi all,
How can I set the version information (major, minor) in my assembly.
And also how can I easily get it at runtime?

-
AM

Nov 16 '05 #4

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

Similar topics

2
by: Terence Shek | last post by:
Is there a way to set the application binding policy so that it always binds to the latest version of an assembly? I'm hoping there is a way to avoid updating the application's binding...
3
by: Michael Bøcker-Larsen | last post by:
Hi I'v been stuck on this problem for ages now. I have found that I'm not the only one with this problem, by looking through the different newsgroups. Hope you can help me! I know there is a...
10
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...
1
by: Andrew | last post by:
In ASP.NET 1.1 I used to retreive the version of my code-behind assembly using following syntax: Assembly.GetExecutingAssembly().GetName().Version The version was defined in AssemblyInfo.cs using...
7
by: R Reyes | last post by:
Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? I'm trying to manipulate MS Word from my Web Form application and I can't get passed...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
5
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...
1
by: Coaster | last post by:
orig ref here http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/ff29cc370678911d/c0db5b7e3da283b9?lnk=st&q=gac+assembly+new+version&rnum=7#c0db5b7e3da283b9...
1
by: nish85 | last post by:
Hi, i have uploaded my sit to web server goddady.com i have a button to download dyanmically generated excel file.This button is ajax enabled.....When i am click on this button it will popup a...
4
by: Bob Altman | last post by:
Hi all, I have a C++/CLI project (VS 2005) that produces a DLL that exports C bindings. Internally, this DLL contains routines compiled with /clr. I notice that my DLL doesn't have a version...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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...
0
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...
0
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...
0
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,...

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.