How to Get Auto Incrementing Version Number in Visual Studio 2013 ?

Published on December 26, 2013 by Senthil Kumar

Filed under Windows Phone

Last modified December 26, 2013

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 0 (0 votes)

This article have been viewed 21680 times

If you are a user looking for a simple trick to auto incrementing version number in Visual Studio 2013 , here we go.

How to Get Auto Incrementing Version Number in Visual Studio 2013 ?

The AssemblyInfo class does the trick for you . Just include the asterik (*) to the end of the AssemblyVersion attribute in the AssemblyInfo class and you are done .

[assembly: AssemblyVersion("1.0.0.*")]

[assembly: AssemblyFileVersion("1.0.0.*")]

When you want to show the assembly version number , use the below code to display the version number .

using System;
namespace AbundantCode
    internal class Program
        private static void Main(string[] args)
            // Test version
            var CurrentAssembly = System.Reflection.Assembly.GetExecutingAssembly();
            string VersionNumber = CurrentAssembly.GetName().Version.ToString();



  1. Auto Incrementing Visual Studio 2013 Version Number
    March 4, 2014 - 9:31 am

  2. Pierre Valade

    I have use this method and it worked up until VS 2010.

    I cannot get it to work for VS 2012, or 2013. Is there an additional configuration setting.

    April 18, 2014 - 1:26 am – Reply

    • Pierre Valade

      I have found the solution

      It will work if I remove
      [assembly: AssemblyFileVersion(“1.0.0.*”)]

      April 18, 2014 - 1:55 am – Reply

Leave a Comment


You might be Interested in these Posts

How to Convert a Number to Bytes Array in C# ?

To Convert a number to a byte array , the developers can use the BitConverter.GetBytes method which ...

How to Print Leading Zeroes for a Number in C# ?

The Leading Zeroes for a number can be printed using the format string "D" in .NET . Below is a samp...

How to Group Digits of a Number for Formatting in C# ?

If you want to group the digits of a number for formatting to display in C# , one could use the "N" ...