| | |
auto incrementation of assembly
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2008
Posts: 9
Reputation:
Solved Threads: 0
hi all,
here i got strucked on auto incrementation of version using c# ,iam trying to do it programatically but i could able to change version number in variables but iam not able to write it back as it is read only.Is there any alternative for this?.
my code is as follows.
here i got strucked on auto incrementation of version using c# ,iam trying to do it programatically but i could able to change version number in variables but iam not able to write it back as it is read only.Is there any alternative for this?.
my code is as follows.
C# Syntax (Toggle Plain Text)
string versionnum; int rev; int major; int minor; int build; Assembly assem = Assembly.GetExecutingAssembly(); AssemblyName assemName = assem.GetName(); applicationVersion = assemName.Version; major = Convert.ToInt32(applicationVersion.Major); minor = Convert.ToInt32(applicationVersion.Minor); build = Convert.ToInt32(applicationVersion.Build); rev = Convert.ToInt32(applicationVersion.Revision) + 1; versionnum = major+"."+minor+"." + build + "." + rev;
•
•
Join Date: Aug 2008
Posts: 1,160
Reputation:
Solved Threads: 137
think you got your revision number hardcoded probably if its not changing, take a look at your assemblyinfo.cs file
you can do this get revision to change automatically
you can do this get revision to change automatically
C# Syntax (Toggle Plain Text)
[assembly: AssemblyVersion("1.1.1.*")]
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
•
•
Join Date: Apr 2008
Posts: 9
Reputation:
Solved Threads: 0
Please anyone tell me how to increment version no at compile time.
I have tried by placing following line in assemblyinfo.cs file still its not working
I have tried by placing following line in assemblyinfo.cs file still its not working
C# Syntax (Toggle Plain Text)
[assembly: AssemblyVersion("1.0.0.*")]
Last edited by mrkcse; Nov 6th, 2008 at 12:21 am.
•
•
Join Date: Aug 2008
Posts: 1,160
Reputation:
Solved Threads: 137
that one changes revision btw
also check the same for
you can look at it in
Project -> Properties ->Application -> Assembly Information
also if you really feel lazy you can use this add in
http://www.codeproject.com/KB/macros/vsautover.aspx
also check the same for
C# Syntax (Toggle Plain Text)
AssemblyFileVersion
you can look at it in
Project -> Properties ->Application -> Assembly Information
also if you really feel lazy you can use this add in
http://www.codeproject.com/KB/macros/vsautover.aspx
Custom Application & Software Development
www.houseshark.net
www.houseshark.net
![]() |
Other Threads in the C# Forum
- Previous Thread: Encryption Problem
- Next Thread: wrong output
| Thread Tools | Search this Thread |
.net access ado.net algorithm array backup barchart bitmap box broadcast buttons c# check checkbox client combobox control conversion csharp custom database databasesearch datagrid datagridview datagridviewcheckbox dataset datetime degrees development draganddrop drawing dynamiccreation encryption enum equation event excel file form format formatting forms function gdi+ httpwebrequest image index input install interface java label list listbox mandelbrot math mouse mouseclick mysql namevaluepairs operator path photoshop picturebox pixelinversion post powerpacks programming property radians regex remote remoting resource restore richtextbox server sleep socket sql statistics stream string table text textbox thread time timer update usercontrol validation visualstudio wait webbrowser windows winforms working wpf xml






