Reading Assembly version information of WPF application Reading Assembly version information of WPF application wpf wpf

Reading Assembly version information of WPF application


The properties Major, Minor, Build and Revision of class Version are of type int, not string. So when string from assembly version is parsed into Version class, the parts of this string will be converted to int representation. Also there are rule that first number of specified version string is Major component of Version:

"1" - 1.0.0.0"1.2" - 1.2.0.0"1.2.3" - 1.2.3.0"1.2.3.4" 1.2.3.4


In the MSDN article, it says that:

All components of the version must be integers greater than or equal to 0

So it's either rounding up or removing trailing zeros to get a valid integer.