MVC Version Page

Expected Result

AsssemblyName: version
VersioningDemos.Web: 2.0.0-[builddata]

Incorrect assumption

Assembly version GetType().Assembly.GetName().Version.ToString()
VersioningDemos.Web.PrecompiledViews: 2.0.0.0
File version GetType().GetTypeInfo().Assembly.GetCustomAttribute<AssemblyFileVersionAttribute>().Version
VersioningDemos.Web.PrecompiledViews: No value (causes an exception)
Product version GetType().Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion
VersioningDemos.Web.PrecompiledViews: No value (causes an exception)

Correct Result

using Program class typeof(Program).GetTypeInfo().Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion
VersioningDemos.Web: 2.0.0-master.20180324.3