SharpLife.NET
A sharp way to know more // Mahdi Taghizadeh's Daily Web Keystrokes.
Navigation for SharpLife.NET - Auto Increment Assembly Version
Content
Sidebar
Footer
May 9, 2006
@ 02:10 PM
Comments [6]
Auto Increment Assembly Version
You have seen a file named "AssemblyInfo.cs (or .vb according to your programming language)" in your projects. This file contains information about the output assembly of your project such as Author's Name, Copyright Notice, ... and Assembly Version. By default assembly version is set to 1.0.0.0. This version declaration shows major.minor.build.revision numbers of your assembly. Two first numbers are commonly constant e.g. 2.0. Third number follows YYMMDD rule (of build date) and the last number is build counter.
It is a good idea to change assembly version and use it in your application. For example you can show Application Version to the end user. It's so easy, take a look:
Assembly
assembly =
Assembly
.GetExecutingAssembly();
string
version = assembly.GetName().Version.ToString();
But one thing that I was interested in was "How to tell Visual Studio 2005 change assembly version in an auto increment behavior?"
After I googled this issue I found a
solution
on MSBuild Team
Blog
. They built an
AssemblyInfoTask
on GotDotNet.com. It's so easy to be integrated in your project. Just download the required package and run it. It will install AssemblyInfoTask in your GAC or Application Data folder (depending on your choice). Then you should add this single line of code to your project file after last
<Import>
tag:
<
Import
Project
=
"
$(MSBuildExtensionsPath)\Microsoft\AssemblyInfoTask\Microsoft.VersionNumber.targets
"
/>
or this one (if you installed it in Data Application folder):
<
Import
Project
=
"
$(APPDATA)\Microsoft\MSBuild\AssemblyInfoTask\Microsoft.VersionNumber.Targets
"
/>
Everything is done now! Your Assembly Version will change automatically based on the rules I said before.
Because Setup file and updated help file of this project are located on GotDotNet.com and you should login to this site and also join this project to download them, I uploaded Setup package and updated Help file for you. Find them below:
Downlod:
Setup Package
|
Updated Help File
Categories:
Download
|
Microsoft
|
.NET General
Related posts:
How to receive BNO breaking news alerts for free on your iPhone via Push Notification
ASP.NET MVC Free eBooks
Microsoft Released Anti-XSS 3.0 Beta and CAT.NET CTP
Receive your free 1-year license for McAfee Virus Scan Plus 2009
iDevCenter is back!
Useful HtmlHelpers for ASP.NET MVC
« CSS Adapter for ASP.NET 2.0
|
Home
|
Stars of Persia! »
Tuesday, May 09, 2006 5:02:25 PM (Iran Standard Time, UTC+03:30)
You can also simply set the AssemblyVersion attribute to "x.y.*" or "x.y.z.*".
Soheil
Tuesday, May 09, 2006 6:03:57 PM (Iran Standard Time, UTC+03:30)
After seconding what Soheil pointed, I should say that this isn't what I do. It's better if you do it manually in AssemblyInfo.cs because when you contribute a project on a server based compilation for a team, you need to update the version in some regular steps ;-)
Keyvan Nayyeri
Tuesday, May 09, 2006 10:17:41 PM (Iran Standard Time, UTC+03:30)
And never even think of auto incrementing version number of a strongly-named shared assembly.
Soheil
Tuesday, May 15, 2007 5:25:40 PM (Iran Standard Time, UTC+03:30)
I think manual is the better approach.
soma online
Tuesday, May 15, 2007 5:26:16 PM (Iran Standard Time, UTC+03:30)
There must be a more elegant way to handle that.
cheap carisoprodol
Tuesday, May 15, 2007 5:26:50 PM (Iran Standard Time, UTC+03:30)
I can just wait and see how this turns out.
wellbutrin
Comments are closed.
Special
Tabassom's Photo Gallery
Contact
Email me! |
|
RSS/Subscribe
Subscribe in a reader
Archives
All dates
All Posts
Search
Latest Posts
Translating your content title using Google Translate API to use in a URL
Build pretty clean URL for your dynamic pages using JavaScript
How to enable your iPhone voicemail for Iran MCI subscribers
How to receive BNO breaking news alerts for free on your iPhone via Push Notification
How to handle non-English characters in ASP.NET MVC routes
ASP.NET MVC Free eBooks
How to choose between ASP.NET MVC and Web Forms
Centralize your identity with Chi.mp
Categories
.NET General (15)
AJAX (11)
ASP.NET (24)
ASP.NET MVC (7)
Book Review (2)
C# (4)
Celebrities (1)
Community Server Persian (1)
dasBlog (1)
Download (27)
eBooks (1)
Freebies (3)
General (7)
i18n (7)
iPhone (2)
Iran (5)
JavaScript (2)
Life (2)
Mathematics (2)
Microsoft (10)
Music (1)
News (1)
Notebook (1)
Other (6)
Personal (15)
Politics (1)
Review (1)
Security (8)
SEO (2)
SharpLife.NET (6)
Smart Phone (2)
Software (7)
Sports (3)
SQL Server (1)
Tabassom (2)
Tips and Tricks (3)
Tools (7)
Training (2)
Tutorial (5)
Web (9)
Web 2.0 (11)
Web Development (13)
Web Services (3)
Archives
November, 2009 (1)
October, 2009 (1)
August, 2009 (1)
April, 2009 (3)
January, 2009 (2)
December, 2008 (3)
November, 2008 (2)
October, 2008 (1)
September, 2008 (2)
August, 2008 (2)
July, 2008 (2)
June, 2008 (1)
November, 2007 (2)
October, 2007 (4)
September, 2007 (14)
August, 2007 (5)
May, 2006 (4)
April, 2006 (6)
March, 2006 (5)
February, 2006 (20)
January, 2006 (2)
BlogRoll
Behnam Youssefi
Farid Arzpeyma
Hadi Eskandari
Hamed Banaei
Hamid Shojaee
Keyvan Nayyeri
Milad Karbasizadeh
Mohammad Mahdi Ramezanpour
Nima Shayafar
Pedram Pourhossein
Raiha Buchanan
Sassan Yeganegi
Scott Hanselman
Shima Dehbashi
Tabassom Taghizadeh
See my little daughter photos.
Categories
.NET General
AJAX
ASP.NET
ASP.NET MVC
Book Review
C#
Celebrities
Community Server Persian
dasBlog
Download
eBooks
Freebies
General
i18n
iPhone
Iran
JavaScript
Life
Mathematics
Microsoft
Music
News
Notebook
Other
Personal
Politics
Review
Security
SEO
SharpLife.NET
Smart Phone
Software
Sports
SQL Server
Tabassom
Tips and Tricks
Tools
Training
Tutorial
Web
Web 2.0
Web Development
Web Services