I want to read the version info of a Strong Named .NET (built using v4.0) assembly using Powershell v2. I am using two different ways to do this, but the 2nd method always gives me the correct version information [although the 1st method was the obvious natural choice] :-
Method 1: [Reflection.AssemblyName]::GetAssemblyName("C:\ManagedAssembly.exe").Version.ToString()
gives the value as "50.0.0.0"
Method 2: [System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\ManagedAssembly.exe").FileVersion
gives the version correctly as "50.0.0.93"
Any idea why such a behaviour ?