I am reading version information of my wpf application, but I am not getting the correct version as I have write in AssemblyInfo.cs file. In my file there is
[assembly: AssemblyVersion("0.1.001")]
[assembly: AssemblyFileVersion("0.0.001")]
I am reading version information using this code
System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
I am getting this version 0.1.1.0 and it should be 0.1.001
Thanks
The properties
Major,Minor,BuildandRevisionof classVersionare of typeint, notstring. So when string from assembly version is parsed intoVersionclass, the parts of this string will be converted to int representation. Also there are rule that first number of specified version string isMajorcomponent ofVersion: