Because I don't understand Yogesh increment scheme

Jan 22, 2010 at 12:59 PM

Hi,

Because I don't understand Yogesh increment scheme I want to use the default " * " symbole in my file AssemblyInfo.cs

With this " * " as build number, I can find the exact date of my build with this code :

System.Reflection.AssemblyName an = System.Reflection.Assembly.GetExecutingAssembly().GetName();
DateTime date = new DateTime(2000, 1, 1, 0, 0, 0);
date += TimeSpan.FromDays(an.Version.Build) + TimeSpan.FromSeconds(an.Version.Revision * 2);
            

 So to do this I have made a simple change in your code :

- add item in IncrementStyle enum : IncrementStyle.Default
- this enum return int.MaxValue in method Increment in StandardVersionIncrementer.cs
- in method UpdateVersion in VersionIncrementer.cs line 300 (in else condition) add this code
replaceWith = replaceWith.Replace(int.MaxValue.ToString(), "*");
replaceWith = replaceWith.Replace("*.*", "*");

It's run like a charm for me.

Regards.

PS. I don't know if you think this is a good update. If yes, I am ready to share my code whith you but I don't know how...

PS. when I try to get the code by SVN, it ask me login/password. My codeplex login/password are refused. If you can explain me how get code by svn. Thanks

Jan 22, 2010 at 9:04 PM

Hi,

Thanks for your answer.

In fact, I have a problem to understand what doest mean the value of Yogesh's increment.

ie : I setup start date to 20/01/2010. Here it's near 22:00 (10:00 PM). The value in my assemblyinfo.cs is 41101 ????

I want to know the date and time of my build.

Regards